A federal judge in Kentucky has slapped a restraining order on the mayor of Louisville and his ban on a drive-in Easter church service.

“The Mayor’s decision is stunning,” district court Judge Justin Walker — nominated just days ago to a seat on the DC Circuit Court of Appeals by President Trump — wrote in a ruling Saturday. “And it is, ‘beyond all reason,’ unconstitutional.”

On Fire Christian Church had been holding outdoor Sunday services drive-in style — with all congregants confined to their cars, each vehicle parked six feet apart — to comply with state-ordered coronavirus social-distancing guidelines.

But Louisville Mayor Greg Fischer, a Democrat, outlawed the services, including the one planned for Easter Sunday, spurring the church to sue.

Kentucky Gov. Andy Beshear, also a Democrat, upped the ante Friday with a bombshell announcement that police will track the license plates of those who attend services on Christianity’s holiest day — and turn them over to local health departments for quarantine.

Walker’s order could open the door to First Amendment challenges to Beshear’s threat.

The authorities “ought not to view the limits of this injunction as a green light to violate the religious liberty”of attendees,” he warned.

Senate Majority Leader Mitch McConnell cheered the decision Saturday.

“Grateful for this strong, eloquent ruling defending Kentuckians’ religious liberty,” McConnell tweeted.

“Of course church parking lots cannot be singled out with unfair standards that differ from other establishments” — noting that the state has not banned such things as drive-thru restaurants.