WASHINGTON (CNN) -- Democrat-turned-independent Sen. Joe Lieberman managed to keep his Senate committee chairmanship in part because President-elect Barack Obama didn't want to punish him for supporting Sen. John McCain, Lieberman said Tuesday.

Sen. Joe Lieberman speaks Tuesday after Democrats allowed him to keep his committee chairmanship.

The Senate Democratic caucus, following a lengthy and often heated debate, voted 42-13 Tuesday to let Lieberman continue chairing the Senate Homeland Security Committee.

The caucus did, however, strip Lieberman of his spot on the Environment and Public Works Committee.

A Democrat in the Senate for 18 years before going independent, Lieberman criticized Obama, the Democratic nominee, during the race for the White House.

"I know that my colleagues in the Senate Democratic caucus were moved not only that Sen. [Harry] Reid said about my longtime record, but by the appeal from President-elect Obama himself that the nation unite now to confront our very serious problems," Lieberman said in the Capitol as those colleagues nodded in agreement behind him. Watch Lieberman express regrets over past statements »

Democrats were angered by Lieberman's speech to the Republican National Convention, where he praised his longtime friend McCain and criticized Obama for not reaching across the aisle to work with Republicans during his time in the Senate.

Reid, the Senate majority leader, said Lieberman's criticism of the Democratic nominee had angered him.

"I would defy anyone to be more angry than I was," he said Tuesday. "But I also believe that if you look at the problems we face as a nation, is this a time we walk out of here saying, 'Boy did we get even'?"

Obama urged Reid privately to let bygones be bygones, sources said.

Reid dismissed vehement criticism of the decision from elements of the party's more liberal base, which insisted Lieberman be punished.

Sen. Bernie Sanders of Vermont, the Senate's other independent who regularly caucuses with the Democrats, told CNN's Dana Bash he was one of the 13 who voted against Lieberman because while millions of people worked hard for Obama, Lieberman actively worked for four more years of President Bush's policies.

But Sen. Tom Carper of Delaware, one of four Democrats who proposed the motion to allow Lieberman to keep his chairmanship, said the caucus decided that it could forgive if Obama could.

"If Barack can move on, so can we," Carper said.

Lieberman, of Connecticut, and Sanders consistently vote on most issues with the Democrats, who hold a 51-49 majority in the Senate including them.

Democrats picked up six more seats in the election two weeks ago. Three more still are being contested in Alaska, Georgia and Minnesota.

Winning those three seats and counting Lieberman and Sanders could give Democrats a 60-seat, filibuster-proof majority, which would allow them to advance legislation at will and prevent Republicans from blocking it from getting to the floor.

After serving three terms as a Democrat, Lieberman lost Connecticut's Democratic 2006 primary to Ned Lamont, who was helped by bloggers and others angered by Lieberman's support for the Iraq war. But Lieberman ran in the general election as an independent and was re-elected.

Lieberman was the Democrats' 2000 vice presidential nominee, running with Al Gore.

Along with McCain, Lieberman co-sponsored the 2002 resolution that authorized the U.S. invasion of Iraq and has resisted removing troops. On the campaign trail with McCain this year, Lieberman strongly defended the Republican presidential nominee's call for staying the course in Iraq.

He endorsed McCain's bid in December 2007 before the first nominating contest of this year's election cycle.

Before the convention speech, Lieberman angered Democrats when he said Obama was choosing to lose the Iraq war by planning to withdraw American combat troops.

"If Barack Obama's policy in Iraq had been implemented, he couldn't be in Iraq today," Lieberman said, referring to a trip Obama was about to make to Iraq. Lieberman added that Obama "was prepared to accept retreat and defeat."

CNN's Dana Bash, Ted Barrett, Evan Glass, John Helton and Alan Silverleib contributed to this report.

All About Joseph Lieberman • U.S. Senate • Barack Obama • John McCain