Don’t pencil in Matt Harvey for that All-Star game start at Citi Field just yet.

The battle for the National League honor likely became a little more interesting last night, when the Mets ace had his worst performance of the season, stumbling to a 5-3 loss to the Diamondbacks before a sellout crowd of 41,257 on Fireworks Night in the Citi.

Harvey walked off the mound without having recorded an out in the seventh inning, after Eric Chavez swatted the right-hander’s 109th pitch of the night off the left-field fence for an RBI double. Harvey was charged for another run later in the inning, completing his final line: A season’s-worst five earned runs allowed on nine hits and three walks with nine strikeouts over six-plus innings.

Both Harvey and manager Terry Collins cited a rain delay of 1 hour, 51 minutes before the game as a factor that didn’t help the fireballer.

“I had prepared for 7 o’clock, but I’m not one to make an excuse,” Harvey said. “I should have been more prepared and obviously didn’t do a good job of that.”

Collins said Harvey was outside the door of his office at 6:30 p.m. champing at the bit wondering if the game would start as scheduled.

“We know he gets all ramped up to pitch,” Collins said. “But it was all about command tonight. He didn’t have command of his stuff — a lot of deep counts. We’ve seen him pitch a lot better, that’s for sure.”