WASHINGTON — Americans want Democrats to control Congress after this year’s elections, a shift from April, according to an Associated Press-GfK poll released Saturday.

The margin is thin, however, and there is a flashing yellow light for incumbents of both parties: Only about one-third want their own lawmakers re-elected.

The tenuous 45 percent to 40 percent preference for a Democratic Congress reverses the finding a month ago on the same question: 44 percent for Republicans and 41 percent for Democrats.

The new readout came as the economy continued showing signs of improvement and the tumultuous battle over the health care law that President Obama finally signed in March faded into the background.

“To the extent that Democrats can focus on job creation rather than health care, they tend to do better,” said Jack Pitney, a political scientist at California’s Claremont McKenna College.

Democrats hold a 254-177 majority over Republicans in the House of Representatives, with four vacancies, while Democrats control 59 of the Senate’s 100 seats, counting support from two independents. Despite those disadvantages, the Republicans have gained political momentum in recent months and its leaders hope to win control of at least one chamber of Congress this November.

Compared with the last AP-GfK poll in April, the survey showed Republicans losing some support among married women, a key component of many Republican victories. Democrats picked up ground among young and rural voters.

“I’m a new Democrat,” said Harley Smithson, 51, of Baltimore, Md., who said he recently switched from the Republicans. “I want to be with a party that’s for something instead of against everything.”

Even so, the poll underscores that the political environment remains ominous for Democrats.

Just 35 percent say the country is heading in the right direction, the lowest measured by the AP-GfK survey since a week before Obama took office in January 2009. His approval rating remains at 49 percent, as low as it has been since he became president.

Congressional Democrats win approval from only 37 percent, although congressional Republicans score an even drearier 31 percent. Democrats and Republicans are about evenly trusted to handle the economy, an issue Democrats once dominated and one that is crucial at a time when the country’s job situation, although brightening, remains grim.

Only 36 percent said they want their own member of Congress to win re-election this fall, a noteworthy drop from the 43 percent who said so in April and the lowest AP-GfK poll measurement this year. Much of the restiveness seems to be among Republicans: While Democrats were about equally divided on the question, Republicans expressed a preference for a new face by a 2-to-1 margin.

The poll was conducted more than two weeks after the Gulf of Mexico oil spill began and during the weekend of the abortive car bomb attack on Times Square in New York. The survey detected no significant changes in the public’s trust in Obama for his handling of the environment or terrorism.

In recent days, the anti-incumbent wave already has spelled defeat in party primaries for a pair of Washington fixtures: Republican Sen. Bob Bennett, in the heavily Republican state of Utah, and Democratic Rep. Alan Mollohan, of the generally Democratic state of West Virginia.

Other veterans such as Democratic Rep. David Obey have announced their retirements, and Sens. Blanche Lincoln, a Democrat, and Arlen Specter, who switched parties to become Democrat last year, face primary challenges Tuesday that could add them to the political casualty list.

Among those most eager to turn incumbents out of office are the one in four who called themselves supporters of the conservative tea party movement. Two-thirds of tea partyers say they want a new person representing them in Washington, compared with half of everyone else.

The AP-GfK Poll was conducted May 7-11 by GfK Roper Public Affairs & Media. It involved cell and landline telephone interviews with 1,002 randomly chosen adults and has a margin of sampling error of plus or minus 4.3 percentage points.