Armin Laschet, the leader of Angela Merkel"s conservative Union bloc who hopes to also succeed her at the chancellery, inadvertently revealed who he voted for as he cast his ballot on Sunday.
Election rules state that ballot papers should be folded in such a way that it's not possible to see how the person voted.
But Laschet did not properly fold his ballot paper, and the two crosses each German voter must place on it, were visible as he put it in the box. Under Germany's complex electoral system, every voter gets two votes -- one for a directly elected lawmaker and the other for a party list.
The Federal Election Commission said on Twitter that the vote "is valid".
"The electoral regulations are clear. The electoral board must reject voters who have folded the ballot paper in such a way that the vote can be seen. This is to ensure that other voters are not influenced," it explained on Twitter.
"If a ballot paper is misfolded, the election committee will distribute a new ballot paper. If the ballot paper nevertheless finds its way into the ballot box, it can no longer be sorted out and is valid," it added.
Polls show Laschet's party is neck-and-neck with the center-left Social Democrats after a bumpy campaign.
Laschet, Minister-President of North Rhine-Westphalia, has committed a number of blunders that cost him dearly in terms of popularity during the campaign.
The most damaging one was when he was filmed laughing as President Frank-Walter Steinmeier gave a speech in a region ravaged by the devastating floods in July, which led to the deaths of 180 people.
Laschet's main rival is the Social Democrats' Olaf Scholz.