The much-criticized forward scored Brazil's third goal in a 4-1 win over Cameroon yesterday, helping his team reach the second round. (Agencies)
Fred found the net with a 49th-minute header after a left-flank cross by defender David Luiz. But the striker said there was more to it.
"As incredible as it seems, the ball came in hard and it ended up hitting my mustache," Fred said.
"It was a mustache goal,” he said.
Teammate Neymar said he was the one who told Fred not to shave his upper lip, predicting it might turn things in his favor.
"I said, 'Come on, Fred, if you leave the mustache you are going to score, the mustache never fails,'" Neymar later explained.
"After he scored I went to him and I said, 'See, I told you that it never fails’,” he added.
Fans and local media had been loudly criticizing the Fluminense striker because of his poor performances at the World Cup.
"Thank God that ball went in," Fred said with a sigh of relief.
"The critics were piling a heavy load on me. I just tried to stay calm. The squad was great with me, I need to thank everyone,” he added.
Brazil coach Luiz Felipe Scolari said the goal will help Fred play better the rest of the tournament.
"We knew that Fred was anxious because he hadn't scored yet," he said.
It wasn't the first World Cup goal for the 30-year-old Fred, who had scored as a youngster when he was in the squad in the 2006 tournament in Germany.
It was his first goal since the warm-up match against Serbia just before this tournament, and his 18th in 37 matches with Brazil.
Neymar is the leading scorer in this squad with 35 goals in 52 matches.
Fred had been going through a similar slump during last year's Confederations Cup when he was scoreless in the first two matches. But he ended the tournament with five goals, including two in the 3-0 win over Spain in the final at the Maracana Stadium.
"I started like this in the Confederations Cup and I knew that I could have some trouble again," Fred said.
"But I was calmer now, I was more prepared mentally. It wasn't bothering me that I wasn't scoring, but that the team wasn't playing so well as it did today. The entire team improved,” he added.
Brazil secured first place in Group A with Monday's victory. It will play South American rival Chile in the round of 16 on Saturday in Belo Horizonte.
The much-criticized forward scored Brazil's third goal in a 4-1 win over Cameroon yesterday, helping his team reach the second round.