Michael Bloomberg said on Monday that he would not wage a bid for the presidency this year, concluding that to do so would risk splitting the vote and helping Donald Trump or Ted Cruz win the White House.

He wrote in a column on Bloomberg View that “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, the former New York mayor who built a business media and information empire, had been studying the possibility of waging an independent bid for the presidency, but wrote that he ultimately decided that such a candidacy would risk handing the election to Trump or Cruz, who now have the most delegates on the way to the Republican nomination.

His candidacy would have upended an already unpredictable election cycle. The fear among many Democrats has been that Bloomberg, an advocate of gun control measures and immigration reform, was more likely to peel away votes from Clinton, if she is the nominee, than from a Republican.

“In a three-way race, it’s unlikely any candidate would win a majority of electoral votes, and then the power to choose the president would be taken out of the hands of the American people and thrown to Congress,” Bloomberg wrote. “The fact is, even if I were to receive the most popular votes and the most electoral votes, victory would be highly unlikely, because most members of Congress would vote for their party’s nominee. Party loyalists in Congress — not the American people or the Electoral College — would determine the next president.

“As the race stands now, with Republicans in charge of both Houses, there is a good chance that my candidacy could lead to the election of Donald Trump or Senator Ted Cruz,” he added. “That is not a risk I can take in good conscience.”

His singled out Trump and Cruz for engaging in extremist rhetoric.

He wrote that he has “known Mr. Trump casually for many years, and we have always been on friendly terms. I even agreed to appear on ‘The Apprentice’ — twice. But he has run the most divisive and demagogic presidential campaign I can remember, preying on people’s prejudices and fears.”

Bloomberg wrote that Cruz’s “pandering on immigration may lack Trump’s rhetorical excess, but it is no less extreme.”

Bloomberg did not endorse any candidate, and was critical of both parties. But he had words of praise for Hillary Clinton’s husband.

He wrote that the “leading Democratic candidates have attacked policies that spurred growth and opportunity under President Bill Clinton — support for trade, charter schools, deficit reduction and the financial sector. Meanwhile, the leading Republican candidates have attacked policies that spurred growth and opportunity under President Ronald Reagan, including immigration reform, compromise on taxes and entitlement reform, and support for bipartisan budgets. Both presidents were problem-solvers, not ideological purists. And both moved the country forward in important ways.”

Bloomberg wrote that he was “flattered” by those who encouraged him to run.

He told Variety last month that “we need people in politics who are unafraid to talk about the real issues that will make a difference for our country.”

Bloomberg reportedly was ready to spend $1 billion on a presidential bid, and aides had been examining the race for weeks. The New York Times even published a version of an ad that was created for a 2016 bid, in which Bloomberg was presented as a “no-nonsense” and “results-oriented” figure.

Bloomberg considered running for president in 2008, a year after he switched his party affiliation from Republican to independent, but ultimately decided against it. He endorsed the re-election of President Obama in 2012.

The first major challenge to waging an independent bid is getting on the ballot in all 50 states, a cumbersome and complicated process. Bloomberg wrote that he had to decide this month whether to run as the deadlines approached in some states.

The most successful recent independent bid was waged in 1992 by Ross Perot. He won almost 19% of the popular vote, but failed to win any electoral votes.