President Obama has tapped Sen. John Kerry, the 2004 Democratic presidential nominee, to play Republican Mitt Romney in mock debate rehearsals, Obama campaign officials and the senator’s office confirmed Monday.

Kerry will help Obama prepare for among the most consequential events of his reelection campaign — the three fall debates against Romney. As the senior senator from Massachusetts, Kerry has studied Romney’s career and campaign style for nearly two decades and has first-hand knowledge of his record as governor.

Kerry has long been considered one of the Democratic Party’s most skilled debaters, and his performances in more than 25 debates in the 2004 race earned plaudits. Some credited his strong debates against President George W. Bush with tightening the race in the closing weeks of the 2004 campaign.

It is his perspective on Romney, though, that could be especially valuable for Obama. Kerry was a key surrogate on behalf of the late Sen. Edward M. Kennedy (D-Mass.) when he defeated Romney in 1994. And Kerry closely observed Romney’s successful 2002 gubernatorial campaign, where his performance in debates against Democrat Shannon O’Brien were believed to have helped him win.

“There is no one that has more experience or understanding of the presidential debate process than John Kerry,” said David Axelrod, Obama’s chief strategist. “He’s an expert debater who has a fundamental mastery of a wide range of issues, including Mitt Romney’s Massachusetts. He’s the obvious choice.”

In his own presidential campaign, Kerry faced similar challenges as Romney does now. He struggled to deal with his aloofness and vast personal wealth as President Bush tried to portray him as out-of-touch with everyday Americans, while the Republicans labeled Kerry a “flip-flopper” for a series of policy shifts.

Romney has not selected someone to play Obama in his mock debates, although he plans to soon. Romney prepared extensively for the Republican debates during the primary season, but although he practiced answers he did not hold mock rehearsals because there were so many other candidates on stage.

In 2008, Sen. John McCain tapped Rob Portman, now a senator from Ohio, to play Obama. Portman also played vice presidential nominee Joe Lieberman in 2000 during Vice President Dick Cheney’s rehearsals.

Kerry’s appointment underscores his growing role in Obama’s political orbit. Obama passed over Kerry for secretary of state to appoint Hillary Clinton, but Kerry became chairman of the Senate Foreign Relations Committee and has been dispatched by the White House on a number of diplomatic missions. He is among the candidates believed to be under consideration to succeed Clinton at the State Department in a second Obama administration.

Kerry helped found a debating society at St. Paul’s School and was a star debater at Yale University. In his 1996 reelection race against Bill Weld, then the popular Republican governor, the two held seven, hour-long televised debates in the Lincoln-Douglas tradition. Kerry’s performance in them helped propel him to victory, 53 percent to Weld’s 45 percent.

A decade later, then-Sen. Joe Biden described the Kerry-Weld debates as “the most significant debates that I’ve ever heard in American politics” since the Lincoln-Douglas debates of 1858.