Nancy Pelosi was elected speaker of the House of Representatives in a triumphant return to the post Thursday, pledging to reach across the aisle to Republicans and make transparency “the order of the day” as Democrats took power.

The California Democrat, the only woman to hold the speakership, won the partisan election with 220 Democratic votes, as 15 members of her party cast their ballots for someone else or voted present. Most Republicans backed Representative Kevin McCarthy.

“Let us pledge that when we disagree, we respect each other and we respect the truth,” Pelosi said in an address to the House chamber. “We will debate and advance good ideas no matter where they come from."

President Donald Trump, at an impromptu White House briefing, congratulated Pelosi on her "tremendous achievement" while he also pushed for funds for a border wall.

"Hopefully we are going to work together and we are going to get lots of things done like infrastructure and so much more," the president told reporters. "I think it will be a little bit different than lots of people are thinking."

The House will turn to business with a vote later Thursday on Democrats’ plan to reopen federal departments that have been closed since Dec. 22. But the Trump administration said the president would veto the two measures, and GOP leaders in the Senate already have said the chamber won’t act without his support, so the shutdown is likely to drag on.

Pelosi, 78, clinched the speakership after weeks of whittling down opposition from some fellow Democrats seeking a new generation of leadership. The deal to win over holdouts put an expiration date on her tenure: she promised not to stay more than four years in the job.

In her speech, Pelosi ticked off an agenda for the House: an infrastructure plan, more transparency in government, less influence for special interests, gun control and measures to protect minorities. She said Democrats would support laws to “protect our borders” while keeping the U.S. welcoming for immigrants.

"We have heard from too many families who wonder in this time of globalization and innovation if they have a place in the economy of tomorrow," Pelosi said. "We must remove all doubt that they do, and say to them individually that we will have an economy that works for you.”

Diverse House

Democrats won the House majority in November’s election, gaining a net 40 seats, by riding a surge of suburban and female voters’ anger at Trump. Pelosi leads an emboldened and diverse Democratic caucus, which includes rising progressive stars as well as moderates who captured traditionally conservative districts. Pelosi will have to balance bipartisan compromises on legislation with oversight of a president whose inner circle and business dealings are under scrutiny.

Democrats control the House 235-199, with one seat in North Carolina not yet decided, giving them authority to launch new investigations of the president and his administration. A record number of women -- 89 Democrats and 13 Republicans -- will hold seats in the chamber. Among them are the first two Muslim women elected to Congress and two who are the first black representatives from New England.

Pelosi becomes second in line to the presidency, after the vice president. She also served as speaker from 2007 to 2011, and is the first person to return to the position after losing the majority since Democrat Sam Rayburn in the 1950s.

Government Shutdown

One of House Democrats’ first acts Thursday will be to vote on legislation to end the partial U.S. government shutdown without adding funds for Trump’s border wall. The plan is to pass two separate bills, one reopening eight departments -- which have been closed since Dec. 22 -- through September 2019 and another temporarily reopening the Department of Homeland Security through Feb. 8.

This would allow negotiations over Trump’s request for $5 billion for a border wall to continue while the rest of the government would continue operating. Republicans have rejected this plan, even though it’s based on bills passed in GOP-led Senate committees, and a White House meeting among Trump and congressional leaders Wednesday yielded no progress.

Trump suggested another meeting on Friday to restart negotiations after the leadership elections.

Trump previously said he relishes the opportunity to confront Pelosi and sees her as a convenient foil for his 2020 re-election campaign. Pelosi, who touted her legislative acumen as her top qualification for returning to the job, will be the country’s most high-profile Democrat as the party chooses a presidential nominee to oppose the president in 2020.

The Republicans’ strategy of defeating Democrats in November’s election by tying them to Pelosi largely failed. Now she will be more than an image in a campaign ad; as House speaker she needs to create an agenda bold enough to keep progressives animated without alienating swing voters willing to consider alternatives to Trump.

One early skirmish with progressives in her own party comes later Thursday when the House will vote on its package of legislative rules, normally a routine matter. But progressives Ro Khanna of California and Alexandria Ocasio-Cortez of New York oppose the package because it contains a "pay as you go" austerity provision supported by Democratic centrists.

Mueller Investigation

Much of the tenor for the 116th Congress could be set by a report from Special Counsel Robert Mueller’s probe of Russian interference in the 2016 presidential election. Some Democrats in Congress, bolstered by outside groups, say there’s already proof that Trump has committed the “high crimes and misdemeanors” that would justify his removal from office, but most party members are waiting for Mueller’s report.

Brad Sherman, a California Democrat who introduced articles of impeachment last year, told the Los Angeles Times that he plans to re-introduce this measure in the new Congress, citing Trump’s firing of then-FBI Director James Comey as an example of obstruction of justice.

Pelosi thus far has rejected pursuing Trump’s impeachment, saying that such a move would be divisive for the country and would need conclusive evidence of wrongdoing from the special counsel investigation.

“We have to wait and see what happens with the Mueller report,” Pelosi said Wednesday in an NBC interview. “We shouldn’t be impeaching for a political reason and we shouldn’t avoid impeachment for a political reason.”

Pelosi said House Democrats should focus more on issues such as immigration, climate and health care that are most important to the American people.

These issues in the past gave Pelosi some victories, such as the Affordable Care Act that was the Obama administration’s signature domestic achievement, and some disappointments, including the Dream Act to protect young undocumented immigrants that she shepherded through the House in 2010, only to see it fail in the Senate.

Leadership Term Limits

The next two terms will be the last chance for Pelosi to work for the policy priorities that have made her a hero to many women and progressives and a constant target of conservative attack ads. Pelosi, first elected to Congress in 1986, said she’ll support a term-limit proposal for party leaders that would also apply to her two septuagenarian deputies: Majority Leader Steny Hoyer of Maryland and Majority Whip Jim Clyburn of South Carolina.

The proposal would limit Democrats in the top three House majority jobs to three two-year terms, with the option for a fourth term if approved by two-thirds of the caucus. Hoyer and Clyburn said they oppose it.

Pelosi said she’ll abide by the proposal even if the party doesn’t adopt it in February. The term limit would be retroactive to her previous two terms as speaker, meaning she would have to step down by 2023. It probably would change little about her career plans.

“Four years? No, I don’t think that’s a lame duck,” Pelosi told reporters after agreeing to the term limit deal last month.