PORT ST. LUCIE — John Maine survived his final Grapefruit League start, but that was about it.

With his stomach churning and head aching, Maine allowed four earned runs on six hits and four walks 4 2/3 innings of the Mets’ 9-3 loss to the Nationals.

Maine’s hurling extended beyond the pitcher’s mound, as he dealt with an upset stomach before and during the game.

He finished the spring 1-3 with a 7.88 ERA and will prepare for a Wednesday regular-season start against the Marlins at Citi Field. Maine said his arm this spring felt better than it did at any point in the past two years.

“The last time [the ball] came out this easy without trying to force anything probably was spring training 2008,” Maine said. “I might have been throwing a little harder then, but it’s coming out good.”

Maine isn’t sure what caused his stomach problems, but said by the fifth inning he was completely dehydrated and weak.