Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

Former New York City Mayor Michael Bloomberg announced Monday he will not enter the 2016 presidential race for fear his candidacy could tilt the election to Republican Donald Trump or Ted Cruz.

“When I look at the data, it’s clear to me that if I entered the race, I could not win. I believe I could win a number of diverse states -- but not enough to win the 270 Electoral College votes necessary to win the presidency,” Bloomberg wrote in a column in Bloomberg View, his opinion site.

Instead, Bloomberg wrote, a potential run could prevent any candidate from getting a majority of the electoral votes and help Trump or Cruz, the two current leaders in the race to capture the Republican presidential nomination.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

The billionaire three-term mayor added, however, that he would not stay silent in the coming months and sharply criticized Trump.

Bloomberg wrote that Trump “has run the most divisive and demagogic presidential campaign I can remember, preying on people’s prejudices and fears,” citing his proposal to ban most Muslims from entering the United States and deporting those here illegally.

The billionaire added that, “Senator Cruz’s pandering on immigration may lack Trump’s rhetorical excess, but it is no less extreme.”

The 74-year-old would have faced a particularly difficult challenge running as an independent in a political system dominated by the two major parties. He wrote that ballot access requirements are the reason he announced his decision now.

A possible Bloomberg entrance into the campaign was one of the biggest unsettled issues of the race. Though the former mayor has been a member of each political party throughout his life, in recent years he has drawn scorn from conservatives for his work to change the nation’s gun laws. Some Democrats worried his name on the ballot in November could siphon votes from the party’s nominee.

But Bloomberg also took some shots at Democrats in his column, saying the candidates have attacked policies implemented by President Bill Clinton that have “spurred growth and opportunity.”

“The current presidential candidates are offering scapegoats instead of solutions, and they are promising results that they can’t possibly deliver,” Bloomberg said. “Rather than explaining how they will break the fever of partisanship that is crippling Washington, they are doubling down on dysfunction.”