WASHINGTON — Justice David H. Souter plans to retire at the end of the term in June, giving President Obama his first appointment to the Supreme Court, four people informed about the decision said Thursday night.

Justice Souter, who was appointed in 1990 by a Republican president, the first George Bush, but became one of the most reliable members of the court’s liberal wing, has grown increasingly sour on Washington and intends to return to his home state, New Hampshire, according to the people briefed on his plans. One official said the decision might be announced as early as Friday.

The departure will open the first seat for a Democratic president to fill in 15 years and could prove a test of Mr. Obama’s plans for reshaping the nation’s judiciary. Confirmation battles for the Supreme Court in recent years have proved to be intensely partisan and divisive moments in Washington, but Mr. Obama has more leeway than his predecessors because his party holds such a strong majority in the Senate.

Replacing Justice Souter with a liberal would not change the basic makeup of the court, where he and three other justices hold down the left wing against a conservative caucus of four justices. Justice Anthony Kennedy, a moderate Republican appointee, often provides the swing vote that controls important decisions.