In a surprise move, former Mayor Mike Bloomberg said Wednesday he is returning to the helm of Bloomberg LP, the business news and data company he founded 33 years ago.

Dan Doctoroff, Bloom­berg LP’s current CEO, is expected to step aside at the end of the year.

“Mike is kind of like God at the company,” Doctoroff told the New York Times Wednesday. “You have to understand that when God comes back, things are going to be different. When God reappeared, people defer.”

The 72-year-old former mayor had said in January, when his 12 years in City Hall ended, that he would spend most of his time at his charity, with just a few hours a day at his company.

But after leaving public office, the ex-mayor — who owns 88 percent of the company and who is worth $33 billion — became more and more hands-on.

That, apparently, put a crimp in Doctoroff’s management style.

In an email to staffers, Doctoroff said, “I have always viewed myself as Mike’s steward at the company. It is and has always been his company and given his renewed interest, it is natural for him to reassume leadership of the company.”

Doctoroff, a close pal of Bloomberg, had served as one of his deputy mayors. He was put in charge of the company as president in January 2008.

During Doctoroff’s tenure, revenues grew to $9 billion from $5.4 billion, and the number of Bloom­berg Terminals — which businesses use to obtain financial information — grew to 321,000 from 273,000.

Doctoroff was the CEO when Bloomberg LP acquired BusinessWeek from McGraw-Hill.

Doctoroff told the Times, which first reported the news of Mike Bloomberg’s return, that he and the ex-mayor remain friends.

The former mayor said in a statement, “I really wanted Dan to stay and continue in his leadership role. But I understand his decision.”

Bloomberg said he wouldn’t officially take the CEO title, even as he assumes the responsibilities.

Doctoroff said he had no specific new job, but would devote himself to a number of charities, including serving on the board of Bloomberg Philanthropies.

A big challenge for Mike Bloomberg once he takes full control of his company is how to make the media side — which includes magazines, TV and radio — profitable.

Bloomberg BusinessWeek alone is said to be losing about $40 million a year.

One bright side is that the losses in media are more than offset by the profits from the terminals, which rent for around $20,000 apiece a year.