President Obama today nominated Senator John F. Kerry to be the country’s 68th secretary of state, citing the Massachusetts Democrat’s deep political and diplomatic experience in selecting him to be the country’s chief foreign representative and top Cabinet officer.

“In a sense, John’s entire life has prepared him for this role,” Obama said during a joint appearance with Kerry in the Roosevelt Room, just steps from the Oval Office the senator tried to reach himself as their party’s 2004 presidential nominee.

“Over these many years, John has earned the respect and confidence of leaders from around the world. He is not going to need a lot of on-the-job training,” the president added. “He has earned the respect and trust of his Senate colleagues – Democrats and Republicans. It is fair to say that few individuals know as many presidents and prime ministers, or grasp more foreign policies as firmly as John Kerry.”

The senator’s wife, Teresa Heinz Kerry, stood off to the side with Vice President Joe Biden, a former Kerry Senate colleague, as the president noted her personal history as an immigrant from Africa. Before the formal speaking started, Biden quipped, “We’re announcing Teresa as the new secretary of state.”

Kerry did not speak, demurring to the president as the two left the room amid shouted questions from the pool of reporters witnessing the announcement. It was the first visible sign of his shift from being a political free-agent to administration team player, even though he soon returned to the Capitol to cast a vote.

The outgoing secretary, Hillary Rodham Clinton, did not attend as she recovers from a concussion after fainting last week following a bout with a virus. Nonetheless, the president paid tribute to her service, which made the former first lady the most-traveled secretary in US history.

Even before being made official, the news of Kerry’s nomination prompted representatives of foreign governments to deluge his Capitol Hill office with congratulatory phone calls. Environmental groups also cheered, believing Kerry will now have a new bully pulpit for his work on global climate change.

If confirmed by the Senate, Kerry would join a lineage as secretary of state started by Thomas Jefferson. He will confront a raging civil war in Syria, lingering diplomatic security questions raised by the Sept. 11 attack on the US Consulate in Benghazi, Libya, and the economic challenge to the US posed by China.

“An uncertain world will continue to test our nation,” the president noted in his remarks.

His elevation to secretary also would close a personal loop started when he grew up in Europe as the son of a member of the Foreign Service.

His resignation as senator, meanwhile, would have a monumental ripple effect on Massachusetts.

Governor Deval Patrick would have to appoint a temporary replacement while a special election campaign is held in the ensuing 145 days to 160 days. Were Kerry to quit before Inauguration Day on Jan. 21, the election would have to be completed by the end of June.

“Here we go again,” Secretary of State William F. Galvin told reporters at the State House, recalling the 2010 special election held to replace the late Senator Edward M. Kennedy and the recently completed 2012 general election.

Senator Scott Brown, a Republican and Kerry’s junior colleague after winning the 2010 special election, has indicated he will probably run in the next one. Brown was defeated in November by Democrat Elizabeth Warren in his bid for a full, six-year Senate term. She won’t take office until Jan. 3 but would become the state’s senior senator once Kerry resigns.

A number of US House members, including Representatives Edward J. Markey, Michael Capuano, and Stephen F. Lynch, are possible Democratic candidates in a special election. Little-known state Senator Benjamin Downing of Pittsfield has also expressed interest in running.

Names mentioned as potential appointees have ranged from Victoria Reggie Kennedy, the late senator’s widow, and Edward M. Kennedy Jr., the late senator’s son, to Margaret Marshall, former chief justice of the Supreme Judicial Court and author of its landmark gay marriage decision, and actor Ben Affleck.

The word of Kerry’s nomination leaked about 45 minutes after the president observed a moment of silence for the victims of last week’s mass shooting in Newtown, Conn., and just before he got in his limousine to drive to the National Cathedral in Washington for a more somber occasion, the funeral of Senator Daniel Inouye.

The Hawaii Democrat and decorated World War II veteran died Monday, and Kerry also attended his funeral rites. He sat next to outgoing Senator Joe Lieberman a few rows behind the president. Inouye was Senate president pro tempore, putting him third in line of presidential succession; as secretary of state, Kerry would be fourth.

Following the funeral, the White House updated the president’s public schedule to include an afternoon “personnel appointment.”

Senate Republicans led by Obama’s 2008 opponent, John McCain of Arizona, and Lindsey Graham of South Carolina, had declared their opposition to Rice’s possible appointment as the nation’s chief diplomat, saying she had misled them about the reasons for the Sept. 11 attack on the US consulate in Benghazi, Libya.

Rice tried to save her nomination but support for Rice in Congress eroded as it built for Kerry.

One potential defense secretary, former Senator Chuck Hagel, a Nebraska Republican, has faced blowback from pro-Israeli groups in particular.

Kerry, who turned 69 last week, is a graduate of Yale University and Boston College Law School. He also is a decorated Navy veteran of the Vietnam War. He was his party’s nominee for president just eight years ago, but lost to President George W. Bush after being labeled a policy flip-flopper and having his Vietnam record pilloried by a group called the Swift Boat Veterans for Truth.

Yet during that campaign, Kerry helped Obama burst onto the national scene, tapping the then-Illinois state senator to deliver the keynote address at the Democratic National Convention in Boston. The two then served together when Obama himself was elected to the Senate.

Following his defeat, Kerry refocused his energies on Senate work and ascended to the chairmanship of the Senate Foreign Relations Committee in 2009 after Biden resigned to serve as Obama’s vice president. Kerry has since been an unofficial administration emissary to world hotspots from the Horn of Africa to Pakistan and served as a Democratic member of a congressional supercommittee trying to reach a broad deficit-reduction agreement.

He also deepened his bond with Obama this fall by assuming the role of Republican Mitt Romney during the practice sessions for the president’s three reelection campaign debates.

Wary of endangering his nomination, Kerry kept his mouth shut about the prospect of being tapped for secretary of state. The senator told a Globe reporter last Friday as he arrived back in Boston from Washington: “When the time is right, you’ll know what’s going on and so will I.”

Kerry will have to undergo a confirmation hearing before the Foreign Relations Committee, a unique juxtaposition as he lobbies for his appointment before his own panel.

Senator Barbara Boxer is the next most senior Democrat on the panel, but she already serves as chairwoman of the Senate Environment and Public Works Committee. Instead the gavel will pass to the Foreign Relations Committee’s next most-senior Democrat, Senator Robert Menendez of New Jersey.

While senators often support one another for Cabinet appointments, some members have faced epic confirmation fights. Then-Senator John Ashcroft of Missouri was confirmed as President George W. Bush’s attorney general in 2001 after contentious hearings and with a split vote of 58 to 42.

The Senate won’t take up Kerry’s nomination until after the next session of Congress begins Jan. 3, at which point Democrats will control the chamber by a count of 55 to 45. It would take 41 votes to block his confirmation through the filibuster process.

Bryan Bender of the Globe staff contributed to this report. Glen Johnson can be reached at johnson@globe.com. Follow him on Twitter @globeglen.

BostonGlobe.com complimentary digital access has been provided to you, without a subscription, for free starting today and ending in 14 days. After the free trial period, your free BostonGlobe.com digital access will stop immediately unless you sign up for BostonGlobe.com digital subscription. Current print and digital subscribers are not eligible for the free trial.

Thanks & Welcome to Globe.com

You now have unlimited access for the next two weeks.

BostonGlobe.com complimentary digital access has been provided to you, without a subscription, for free starting today and ending in 14 days. After the free trial period, your free BostonGlobe.com digital access will stop immediately unless you sign up for BostonGlobe.com digital subscription. Current print and digital subscribers are not eligible for the free trial.