Bernie Sanders and Mike Bloomberg locked horns on political philosophy in Wednesday's Democratic presidential debate, arguing over who's a communist and who's a socialist.

Their bickering over Bloomberg's billions and Sanders' millions descended into a fight over who owned more homes during a contentious debate where the entire stage of candidates ganged up on the former New York City mayor and the Vermont senator found himself a target after becoming the frontrunner for the Democratic nomination.

Bloomberg was defending his net worth, estimated to be around $64 billion, pointing out he earned it through 'hard work' and that he was giving his money away when Sanders argued the workers helped make that money.

‘Mr. Bloomberg, it wasn't you who made all that money. Maybe your workers played some role in that as well,' the Vermont senator said. 'And it is important those workers are able to share the benefits also. When we have so many people who go to work every day and they feel not good about their jobs. They feel like cogs in a machine. I want workers to be able to sit on corporate boards as well so they can have some say over what happens to their lives.'

Mike Bloomberg accused Bernie Sanders, a self-described Democratic socialist, of being a communist

Bernie Sanders charged the former mayor with taking a 'cheap shot'

The former New York City mayor then accused Sanders, a self-described Democratic socialist, of being a communist.

'I can't think of a ways that would make it easier for Donald Trump to get reelected than listening to this conversation. This is ridiculous. We're not going to throw out capitalism. It was called communism and it just didn't work,' Bloomberg said.

Democratic socialists believe the means of production should be collectively owned alongside a democratic political system of government. Communism advocates for the common ownership of the means of production and the absence of social classes, money and state.

Sanders, who is worth $2.5 million according to Forbes, accused Bloomberg of taking a 'cheap shot' against him.

'Let's talk about democratic socialism, not communism, Mr. Bloomberg. That's a cheap shot,' he said.

The two men represent the opposing ends of the Democratic Party - Bloomberg for the moderates and Sanders for the liberals.

And they are both fighting to get their supporters to help them win the nomination.

Bloomberg didn't let up against Sanders, pointing out the senator owns three homes.

‘What a wonderful country we have. The best known socialist in the country happens to be a millionaire with three houses. What did I miss here?,' the former mayor said.

Sanders outlined the three homes he owns.

‘I work in Washington, house one. Live in Burlington, house two. Like thousands of other Vermonters, I have a summer camp. Which tax haven is your home?,' he shot back.

‘New York City, thank you very much,' Bloomberg snapped back, 'and I pay all my taxes and I'm happy to do it because I get something for it.'

The first debate featuring Bloomberg found the former mayor defending his record on race and gender amid his defense of the billions he made as a businessman in New York.

Bernie Sanders walks behind Mike Bloomberg on the debate stage

It was the first debate featuring Mike Bloomberg along with Elizabeth Warren, Bernie Sanders, Joe Biden, Pete Buttigieg and Amy Klobuchar

Sanders, who has taken the lead in the recent national polls on the race, had to defend his health and his ability to beat Donald Trump in November.

The debate, held in Las Vegas, comes three days before the Nevada caucuses - the third nominating contest for Democrats.

Bloomberg may be on the debate stage but he won't be participating in the caucuses. He's skipping the first four voting states to focus on Super Tuesday - the March 3 date where 14 states pick one-third of the delegates needed for the nomination.

While most of the hits were against Bloomberg, all of the candidates came under fire from one another and they all ended up on the defense at one point or another during the two-hour event.

'This has been quite a debate,' Amy Klobuchar said at its conclusion.