MIAMI - Miami Marlins ace Jose Fernandez says his long layoff was a life lesson, even if it was lousy for his career.

Now he's back, saying he's a better person for having made the taxing, tedious recovery from Tommy John surgery. He'll pitch for the first time since May 9, 2014, when he faces the San Francisco Giants on Thursday.

"I've been waiting 13 months," said the 22-year-old Fernandez. "If I've learned something, it's how to be patient at my age."

Fernandez has always been in a hurry. He pitched only 27 games in the minor leagues, joined the Marlins at age 20 and became NL Rookie of the Year at 21 in 2013.

He was the Marlins' opening day starter last year, but his ascent was interrupted by an elbow ligament injury that required reconstructive surgery.

Then came the wait to return. Is Fernandez proud of his patience?

"The first four months, no chance," he said with a laugh. "Now I feel like I've gotten a little better, not only for pitching, but for life."

Fernandez won't be the only pitcher making a comeback Thursday — Giants right-hander Matt Cain will start for the first time since July 2014.

Cain underwent elbow surgery last year and has been sidelined this season with a strained flexor tendon. Another starter on the disabled list, Jake Peavy, is scheduled to rejoin the San Francisco rotation Friday.

While the World Series champion Giants have stayed in the thick of the playoff chase despite a wave of injuries, the Marlins are hoping Fernandez can turn their season around. Despite high expectations, they have fallen into a deep hole in the NL East standings and are without injured slugger Giancarlo Stanton for four to six weeks.

At a minimum, the dynamic Fernandez should improve the mood in the clubhouse and stir fan interest. The Marlins expect a crowd of 25,000 to 30,000 for Thursday's noon start.

"This team, this organization, this city should be excited to have a guy of his ability back in the rotation," manager Dan Jennings said. "I know he's excited, and we're excited about him coming back."

Fernandez will get six days' rest before his second start, which is also scheduled to be at Marlins Park on July 9 against Cincinnati.

One Marlins fan, Andres Salgado, let his hair and beard grow during Fernandez's hiatus. To celebrate their ace's return — and raise money for charity — the Marlins invited Salgado to the ballpark before Wednesday's game, and Fernandez helped shave his head and face.

"Look, he's becoming a good-looking guy now," Fernandez said with a grin after turning the clippers over to an actual barber.

Yet to be determined is how soon Fernandez might look like his old self, a pitcher who went 16-8 with a 2.25 ERA in 36 career starts before his injury.

Fernandez endured no significant setbacks during his rehabilitation. But Marlins closer A.J. Ramos, who underwent Tommy John surgery while at Texas Tech, acknowledged it's not a given Fernandez will immediately excel.

"I went through the same thing when I was in college, and it's a long process," Ramos said. "When you're away from the mound for a long time, it's tough. A lot of it is mental. It's just about getting over that mental hump and knowing that you can still go out there and compete and not have any issues."

Fernandez will be on a "common-sense" pitch count, said Jennings, who declined to elaborate. The right-hander threw 90 pitches in his final rehab start Saturday in Double-A. Backup catcher Jeff Mathis, who has worked with Fernandez since 2013, will be behind the plate.

That may help settle the excitable Fernandez, who's at risk of trying to channel more than a year of pent-up energy into every fastball.

"He's going to be amped up," Jennings said. "But I think he's wise enough to calm things down and stay in the right frame of mind and the zone that he needs to compete in."

Fernandez may attempt to strike out every batter, but knows he won't. At this point in his comeback, he said, he realizes the important thing is that he's healthy and on the mound again.

"To be back in that circle," he said, "is going to be really special."