Massachusetts Gov. Deval L. Patrick (D) selected William “Mo” Cowan, his former chief of staff, to temporarily fill Sen. John F. Kerry’s seat, bringing the number of African Americans in the Senate to two, a historic high.

Cowan, 43, will serve until a special election in the summer determines who will serve out the remainder of Kerry’s term, which ends in 2015. Kerry was picked by President Obama to be secretary of state.

Cowan, a lawyer, will become the first African American to represent Massachusetts in the Senate since Republican Edward Brooke held the seat from 1967 to 1979.

A month ago, South Carolina Gov. Nikki Haley tapped fellow Republican Rep. Tim Scott to replace Sen. Jim DeMint. As a result, for the first time in history there will be two black senators serving simultaneously.

In picking Cowan, Patrick bypassed former Rep. Barney Frank, who openly campaigned for the seat.

Find out all about the new faces in the 113th congress — sort by state, party, gender and chamber and see who was elected where and why.

Cowan, who said he was “honored and humbled by this appointment” will serve as Congress is set to begin another round of budget fights over entitlement programs and funding the goverment.

Patrick highlighted Cowan’s work on the economy in praising his close friend and former staffer.

“Mo’s service on the front lines in our efforts to manage through the worst economy in 80 years and build a better, stronger Commonwealth for the next generation has earned him the respect and admiration of people throughout government,” Patrick said in a statement.

Democrats will face off in an April primary to determine who will run in the general election. Rep. Edward J. Markey has already announced his intention to run, and Rep. Stephen F. Lynch is expected to announce Thursday that he will challenge Markey, who has already been endorsed by Kerry and former Rep. Barney Frank.

Former senator Scott Brown (R), who lost in November after winning the state’s other Senate seat in a 2010 special election, is strongly considering a run, according to a recent report.

A recent poll shows him leading Markey by more than 20 points.

Cowan is a native of Yadkinville, N.C., a rural tobacco town where, as a boy, he watched the Ku Klux Klan burn a cross and march on his high school, according to a 2010 profile in the Boston Globe.

The son of a machinist and a seamstress, Cowan earned an undergraduate degree from Duke University and law degree from Northeastern University. He remained in Boston after law school and met Patrick in the 1990s.

In the 2010 Globe profile, Cowan described an early interaction between the two: “I essentially cold-called him and said: ‘Hey, you really don’t know me. I’m a young, know-nothing lawyer, but you seem to have a handle on this thing. Would you mind sparing a few minutes whenever you can to give me a bit of advice?’ And he said: ‘Sure. What are you doing right now?’ ’’

Cowan joined the Patrick administration in 2009 and became the governor’s chief of staff in January 2011. Before that, he served as Patrick’s chief legal counsel.

Before serving in the state government, Cowan was a partner at Mintz Levin in Boston, where he practiced civil litigation for 12 years.

Cowan announced his departure as chief of staff in November and returned to the private sector.

Cowan and Patrick have cultivated a close relationship, and his appointment keeps up a trend of governors appointing close allies to fill Senate vacancies. It also follows another trend: Since President Obama’s election, three African Americans, including Roland W. Burris, have been appointed to fill vacant Senate seats. (Burris replaced Obama in a seat representing Illinois.)

“The people of the Commonwealth have benefited from [Cowan’s] wisdom and good judgment during his time in our office, and will again in the Senate,” Patrick said in his statement Wednesday.

Ann Gerhart contributed to this report.