The Kremlin is considering legal action against President Vladimir Putin’s chief opponent for calling for a boycott of next year’s election after he was banned from the ballot.

Opposition leader Alexei Navalny urged his supporters not to participate in the March 2018 presidential election once the Central Election Commission unanimously decided that a previous conviction for fraud made him ineligible to run.

Moscow said Navalny’s call to action could have violated the law.

“The calls for a boycott will require scrupulous study, to see whether or not they comply with the law,” Kremlin spokesman Dmitry Peskov said Tuesday.

He dismissed suggestions that not allowing Navalny to challenge Putin would taint the election.

“The fact that one of the would-be candidates is not taking part has no bearing on the election’s legitimacy,” ​Peskov ​said.

​Navalny, 41, said ​the conviction was politically motivated and the ban against his candidacy shows how fearful the Kremlin is of his candidacy.

“Putin is terribly scared and is afraid of running against me,” he told his supporters on Monday.

P​utin, who has been in power for 18 years, announced his bid for re-election earlier this month and according to polls is expected to easily win another term.

State-run polls put his approval rating around 80 percent.

Later Tuesday, Putin supporters — including prominent actors, musicians and athletes — gathered in a Moscow exhibition hall to endorse him for another six-year term.

Nearly 700 of his backers pledged their support for his re-election, more than the 500 needed to initiate a presidential bid.

Putin, 65, did not attend because of other engagements.

But Sergei Kislyak, Russia’s former foreign ambassador to the United States, said he sees smooth sailing ahead with Putin.

“I have worked under the leadership of the president for quite a long time so I know that everything will be all right for us with President Putin,” Kislyak told Reuters.

But while Putin has largely been absent from the campaign, Navalny has kept up an aggressive pace, reaching out to the farthest regions of the country to reach voters.

The European Union in a statement said keeping Navalny off the ballot “casts a serious doubt on political pluralism in Russia and the prospect of democratic elections next year.”

With Post wires​