WASHINGTON — General Motors chief executive Mary Barra got the royal treatment when she visited Washington in January: a mention in the State of the Union address, a seat in the first lady’s box and a warm welcome from lawmakers in both parties.

WASHINGTON — General Motors chief executive Mary Barra got the royal treatment when she visited Washington in January: a mention in the State of the Union address, a seat in the first lady’s box and a warm welcome from lawmakers in both parties.

But the mood will be markedly different this week, when Barra is to face questioning from two congressional panels about GM’s handling of a defective ignition switch that has been linked to 13 deaths.

The high-profile appearances — before the House Energy and Commerce Committee on Tuesday and a Senate panel on Wednesday — will be a key test of Barra’s leadership of GM, where she started working when she was 18 and this year became the first female chief executive of a major automaker.

But the hearings will also highlight GM’s relationship with Washington, which came to its rescue with a nearly $50 billion federal bailout five years ago, prompting some critics to dub it "Government Motors."

With 117 facilities spread across 75 congressional districts and a robust lobbying budget, GM has strong ties on Capitol Hill. And while its most forceful advocate, Rep. John Dingell, D-Mich., has announced his retirement after six decades in office, he is expected to be succeeded by his wife, Debbie, who worked at GM for about 30 years. (She also has family ties to the company; her grandfather was one of seven brothers who started or worked for Fisher Body, a storied Detroit manufacturer that became part of GM.)

As a big employer that the government made a big bet on, "GM starts off in a position where institutional Washington has to be rooting for it to come through," said Larry Kamer, a public affairs strategist who worked in the past for GM and Toyota.

GM faces damage to its brand at a critical time, as well as the possibility of private lawsuits and civil fines. In addition, a federal investigation into the company is being carried out by the same team that built a case against Toyota, which this month agreed to a record $1.2 billion settlement to end a criminal probe into its handling of safety problems.

GM has been in the spotlight before, most recently during the 2012 presidential campaign, when Democrats celebrated the jobs that the federal bailout had saved and Republicans criticized what they said was a bad deal for taxpayers. After Vice President Joe Biden’s campaign-trail boast that "Osama bin Laden is dead and General Motors is alive," the company tried to take a low profile, putting its plants off-limits to candidates from both parties.

For now, the White House appears to be keeping its distance from the problems at GM, and members of Congress have vowed a thorough investigation of how the company and the National Highway Traffic Safety Administration handled the situation. A key question is whether GM failed to follow federal law when it delayed telling regulators about the ignition switch blamed in the fatal accidents.

Washington lobbyists and public affairs advisers whose clients have been through similar grillings say the company has probably been preparing on several fronts. Outside lawyers have been meeting with committee staffers, providing documents and answering technical questions. At the same time, lobbyists who work for the company and at outside firms are likely to be meeting with committee members, trying to tell their story and answer any questions they can before the hearings, while also talking with lawmakers who have plants and other GM facilities in their districts and may be worried about any impact on jobs. The company reported spending $8.8 million on federal lobbying in 2013.

Barra has probably been preparing for her first appearance at a congressional hearing with practice sessions and background files on committee members.

"When she walks into that room, it cannot feel like the first time that she’s answering those questions," Kamer said.

People who know Barra say she isn’t an electrifying orator, but they expect her to speak her mind. "What she will say is what she believes and what she knows," said David Cole, a Detroit-based expert on the auto industry, noting her background as an engineer. "If she doesn’t know something, she will say it. She’s not going to blow smoke."

Barra previewed her approach to the hearings in a March 18 meeting with reporters in Detroit. "My message will be that we are focused on the customer, we are doing everything we can to support the customer, to get their vehicles fixed, that I am very sorry for the loss of life that has occurred and we will take every step we can to make sure this never happens again," she said.

The company usually works with three public relations firms, and Greg Martin, a GM spokesman, said it had not retained any additional help to deal with the current crisis. But GM has learned one important lesson. The chief executives of the Big Three automakers drew jeers in 2008 when they flew to Washington on corporate jets to ask for a $25 billion loan package. Barra will travel on a commercial flight, Martin said.

Dingell, the longest-serving member of Congress in history and a former chairman of the powerful Energy and Commerce Committee, is said to have a good relationship with Rep. Fred Upton, R-Mich., the panel’s current chairman, who led the committee’s 2000 investigation of fatalities linked to Firestone tires that were on Ford SUVs. While Tuesday’s hearing is being held by the oversight and investigations subcommittee, the two Michigan lawmakers are expected to play leading roles.

"The auto industry is important to Michigan, but auto safety is important to everyone," Upton said in an e-mailed statement. "Automobile safety is a life or death issue, and my priority is keeping drivers safe behind the wheel."

Joan Claybrook, a former NHTSA chief and former president of Public Citizen, a consumer advocacy group, has been speaking with Democrats on the House panel and on the Senate Commerce, Science, and Transportation Committee about the hearings. She said it may be too soon to learn much from GM as it conducts its internal reviews, but she expects tough questioning of NHTSA’s acting administrator, David Friedman, over the regulator’s failure to open its own investigation. Questions about the way the bailout allowed GM to escape liability for crashes that occurred before the deal was finalized, in July 2009, are also likely, Claybrook and other industry analysts said.

Despite GM’s many political ties, some observers say greater transparency and an increased sense of vulnerability among elected officials may be changing the way politicians treat their home-town industries.

"There was a time when politically solid entities were viewed as being in better shape because of their political relationships," said Alex Vogel, a Republican lobbyist. "I don’t think that holds anymore. "

"If General Motors does wrong, Joe Biden isn’t going to pull his punches," Vogel said. "The Michigan delegation is a huge advocate for the industry. But when the industry does wrong, they’re not going to find a lot of protection from these guys."

The industry still has its fans. On Wednesday, Sens. Rob Portman, R-Ohio, and Carl Levin, D-Mich., launched the Senate Auto Caucus, a bipartisan effort to boost the industry’s standing.

But in the coming days, the company will mostly need to rely on itself. As Kamer put it, "We’re really at the phase now where GM has to stand on its own two feet."