David Peterson. Photo by Ed Delany of MetsmerizedOnline

David Peterson beat out Tylor Megill for the final spot in the Mets opening five-man rotation, according to the New York Post’s Jon Heyman.

Peterson was immaculate during spring training. He pitched 12 scoreless innings, struck out 13, and allowed just one hit on his way to earning the rotation spot that opened as a result of an injury to free-agent acquisition Jose Quintana.

When Quintana’s injury was first reported, the Mets leaked that Megill was the favorite for the job. But Peterson made that decision much harder with his level of play.

Peterson earned the job. Not only due to his pristine performance but he has a  longer history of doing so in the majors. Last season he started 19 games, posting a 3.86 ERA. In his 91 innings pitched, he struck out 110 batters.

Megill was roughed up in his final few outings this spring. He began spring by allowing just one run over 8 and 1/3 innings pitched but lost his command toward the end. In his final two starts he walked 10 batters in 8 and 2/3 innings, allowing six runs.

Megill opened last season in the rotation and was a delight until injury wrecked his promising season. Megill was the starter during the Mets’ combined no-hitter last season and ultimately stepped into the No. 2 starter role with ease once Jacob deGrom went down.

Megill will be starting for the Mets at some point this season. Injuries always lead to open spots and he’ll be the first to get the call from Syracuse. The Mets haven’t announced if he’ll land in the pen to start the season but there’s little room for him there as well, especially since it’s a position he struggled in last fall.

With spring performances it was clear who should get the first crack in the rotation. The Mets rotation now lines up as Max Scherzer, Peterson, Justin Verlander, Kodai Senga, Carlos Carrasco. Scherzer has already been announced as the Opening Day starter while Verlander will pitch the Mets home opener the following week.