The House voted 95-59, and the Senate 24-16, just moments after a separate House vote in which lawmakers declined to make the law go into effect immediately.
That means Gov. Deval Patrick must send a letter to the secretary of state declaring an emergency if he wants an interim replacement right away. Otherwise, he must wait 90 days, leaving a vacancy for most of the five-month special election campaign now underway to fill the seat permanently.
House Republicans accused Patrick and his fellow Democrats of a power grab. Democrats defeated GOP efforts to allow an interim appointment in 2004 and 2006, while a Republican, then-Gov. Mitt Romney, was in power.
The vote Wednesday against the emergency preamble included numerous Democrats. There are only 16 Republicans in the 160-member chamber and five in the 40-member Senate, and some Democratic opponents joined the GOP in complaining their party was changing the law merely to ensure Obama regained a filibuster-proof margin in the Senate.
"This is not an emergency," said Rep. Paul Frost, R-Auburn. "So however the governor is going to write a letter to the secretary of state, saying the Legislature didn't agree it was an emergency, but I do, I can't wait to see it."
Meanwhile, a family confidant said that Kennedy's two sons, Edward Kennedy Jr. and Rep. Patrick Kennedy, had placed separate calls to Patrick, urging him to appoint former Democratic National Committee chairman Paul G. Kirk Jr. to replace their father.
A top Patrick aide confirmed the contacts but said no decision had been made. A spokeswoman in Patrick Kennedy's congressional office declined to comment.
Patrick could announce his pick as early as Thursday, assuming no further constitutional challenges. He was returning to Boston Wednesday evening from his vacation home in the Berkshire Mountains, where he has been recovering from hip replacement surgery for the past three weeks. Aides said he planned to meet with fired Hyatt hotel workers he is trying to get reinstated. They would not say if he had any announcements planned.
The 71-year-old Kirk, a Boston attorney, was close friends with the senator. He and his wife, Gail, live on Cape Cod, and he was among the few regular visitors allowed at Kennedy's Hyannis Port home before he died there of brain cancer on Aug. 25.
Kirk also knows the senator's staff intimately and would likely be assured of their loyalty given his relationship with Kennedy.
As a senior statesman who has never served in political office, he would pose no threat to any of the candidates competing in the special election. The Democratic field includes Attorney General Martha Coakley, vying to be the state's first female senator, and U.S. Rep. Michael Capuano, the lone member of the state's congressional delegation in the race.
The family confidant, who like the Patrick aide demanded anonymity to speak about private conversations, refused to reveal whether the senator's widow, Vicki, had also endorsed Kirk. Vicki Kennedy has granted no interviews since her husband's death, but Patrick revealed recently that she had told him she did not want to be considered for the interim appointment.
Kirk graduated from Harvard College and Harvard Law School and served on Kennedy's staff between 1969 and 1977. He ran the Democratic National Committee in the run-up to former Massachusetts Gov. Michael Dukakis' unsuccessful run for president in 1988.
Kirk also co-founded the Commission on Presidential Debates, which has sponsored every presidential and vice presidential debate involving major candidates since 1988.
He now serves as chairman of the John F. Kennedy Library Foundation. He was in the national spotlight last month when he hosted a memorial service the evening before Kennedy's funeral.
Kirk also is exceptionally close to Caroline Kennedy, who serves as president of the library foundation honoring her late father. He stood on the stage with her and the late senator each year as they dispensed the library's annual "Profiles in Courage" awards.
Asked recently whether he would be interested in an interim appointment, Kirk told The Associated Press in an e-mail, "It would be much too presumptuous of me to even consider. Hope you will understand."
Dukakis is among those who is said to be under consideration. He, too, has declined to comment on the question.