The Senate race in Iowa between Republican Joni Ernst, left, and Democrat Bruce Braley has tightened considerably heading closer to election day. (Left: Katherine Lucey/AP. Right: Nikki Kahn/The Washington Post)

When Joni Ernst burst into public consciousness here this past spring, she was talking about castrating hogs as a child on an Iowa farm. Another ad showed her wearing a leather jacket and stepping off a Harley-Davidson to point a pistol at the camera.

Well, meet the new Joni Ernst. Iowa’s Republican Senate nominee went on the air this week with an ad in which she sits at a kitchen table, speaks directly to the camera, and says she cares about protecting Social Security, good schools, good-paying jobs and affordable health care.

Ernst’s effort to project a more moderate image reflects what Democrats say is a shift in the dynamic in one of the closest and most contentious midterm campaigns in the country. In Iowa — which Republicans have looked to as a potential insurance policy for taking control of the Senate — the debate increasingly has centered on issues that could give Democrats the edge.

The question is whether Iowa is part of a broader political shift in other competitive states that would allow Democrats to maintain their Senate majority, even if by the slimmest of margins.

Republicans need to win a net of six seats to take control. With seven weeks until Election Day, both parties agree that Republicans will gain at least three seats. They have opportunities to pick up the final three seats in at least eight states. Republicans continue to express confidence that they will get there, but Democrats are finding new reasons to be optimistic.

Election Lab: See our current forecast for every congressional race in 2014

President Obama’s low approval ratings are creating a drag in almost all the truly competitive races. Democrats are relying on the performance of their candidates and the advantages they have on pocketbook and women’s-health issues to withstand strong challenges from Republicans. The debate over these issues is especially pronounced in swing states that Obama has carried, such as Iowa.

Two months ago, Iowa Gov. Terry Branstad (R) said in an interview that he was “pretty confident” that Ernst would beat Rep. Bruce Braley, the Democratic nominee for the seat being vacated by Sen. Tom Harkin (D), who is retiring.

Last weekend, Branstad sounded less bullish. “It’s going to be a very close race,” he said, an outlook he repeated several times in an interview.

The governor’s changing tone comes at the end of a summer in which Ernst has been the target of a relentless barrage of negative advertising by the Democrats.

Through the early part of the year, Republicans had doubts that they could make the Iowa race competitive. Then, in the spring, Braley committed mistakes while Ernst showed sudden potential. In the June GOP primary, she catapulted from far behind in a multi-candidate field to win 56 percent of the vote. She earned endorsements across the Republican spectrum, including from Sarah Palin and Mitt Romney.

But Ernst emerged from the primary as a polarizing figure, having staked out controversial conservative positions that Democrats immediately seized upon. She expressed an openness to privatizing Social Security for younger workers, opposed a federal minimum wage, supported abolishing the Education Department and, as an Iowa state senator, sponsored “personhood” legislation stating that life begins at conception.

“That person who talked about castrating pigs is now kind of identified in voters’ minds as an extreme tea party politician,” said Geoff Garin, Braley’s pollster. “Her campaign is figuring out that that’s not what voters want, but I think it’s too late to take it back.”

A CNN-ORC poll released Tuesday shows Braley leading Ernst by 49 percent to 48 percent among likely voters, within the margin of error. Among registered voters, Braley leads by 50 percent to 42 percent.

Ernst’s hopes may rest on how well she does with women. The CNN-ORC poll shows Braley leading 57 percent to 41 percent among likely female voters; Ernst’s new television ad appears to be an attempt to make up some of that ground.

Through the summer, Braley and Democratic outside groups have outspent Ernst and Republican groups. Democrats also have been more consistent in their attacks than the Republicans.

Democrats believe the campaign will come down to issues and ideology. But Republicans hope to reframe the race by drawing a sharp contrast between the personalities and characters of the candidates, believing Ernst will be seen as the more likable of the two.

“When you strip it all away, she is just a better candidate than he is,” said strategist Todd Harris, who is part of the team that has made the Ernst TV ads. “And ultimately I think the race will come down to a choice between Iowa and Washington.”

Ernst’s allies are counting on GOP outside groups to significantly step up their spending in Iowa to supplement the attacks likely to come from her campaign. The U.S. Chamber of Commerce this week began airing a folksy ad in which the popular Sen. Charles E. Grassley (R-Iowa) makes the case for Ernst bringing “Iowa common sense to Washington.”

Braley, a former president of the Iowa Trial Lawyers Association, appeared before a group of trial lawyers at a fundraiser in Texas and disparaged Grassley, who will chair the Senate Judiciary Committee if Republicans win the majority, for being a farmer without a law degree.

And after Braley got into a dispute with a neighbor over her chickens, Ernst labeled him “a litigious individual” and said his character was “not the Iowa way.”

Ernst suffered a setback when the Iowa Corn Growers Association endorsed Braley, but Branstad predicted a backlash from individual growers. “You gonna vote for a farm girl, or you gonna vote for a trial lawyer?” Branstad said. “I think in the end of the day, the vast majority of farmers are going to vote for her.”

Braley advisers believe he has turned a corner as a candidate after a stretch in which he seemed to have been knocked off his stride. They see three upcoming debates as an opportunity to make the argument that Ernst’s views are out of the mainstream.

“She’s seen as somebody who embraces fringe ideas and doesn’t really have an open mind on a lot of issues,” said Jeff Link, Braley’s campaign strategist.

Officials in both campaigns agree that the race could be decided by one percentage point or less.

Nationally, political handicappers offer somewhat contradictory views on the Senate campaign landscape. Three forecasts that use modeling — The Washington Post’s Election Lab, the New York Times’ Upshot and Nate Silver’s FiveThirtyEight — all have shown movement toward the Democrats recently. All suggest that the question of who will control the Senate in January is up for grabs.

Two more-traditional handicappers, the Cook Political Report and the Rothenberg Political Report, have offered a more bullish view of Republican chances.

Senate Majority Leader Harry M. Reid (D-Nev.) argued Tuesday that strong Democratic candidates in competitive states will offset the unfavorable national climate.

“If the election were today, we would be just fine,” Reid told reporters. He added: “It’s getting better every day.”

In North Carolina, embattled incumbent Sen. Kay Hagan (D) holds a slim lead in polls largely because of questions about her opponent, state House Speaker Thom Tillis (R). And in Arkansas, a state otherwise hostile to Democrats, Sen. Mark Pryor (D) remains competitive for reelection because of an uneven performance by Rep. Tom Cotton (R).

Still, most Democratic incumbents are below 50 percent in the polls, and Republican challengers are banking on undecided voters to break their way. Brad Dayspring, communications director for the National Republican Senatorial Committee, said the current snapshot should be “a huge warning that suggests voters are shopping for someone new.”

Wesley Lowery in Washington contributed to this report.