The deputy administrator of the nation’s top railroad safety agency has resigned after allegations were raised about “outside work” he took on while employed as a senior federal official, the Transportation Department said Saturday.

For weeks, the department had been facing media questions about the official, Heath Hall, a public relations professional and political consultant who served as a spokesman for a sheriff’s office in Mississippi before — and, apparently, sometimes during — his time in Washington at the Federal Railroad Administration.

A department spokesman said Wednesday that Hall had requested a leave of absence in January “so that he could address an urgent family matter.”

Politico first reported Hall’s departure and questions about his continued relationship with the outside firm he had run.

Hall, who referred to Transportation Secretary Elaine Chao as a hero and mentor, was appointed deputy administrator in June. He could not be reached for comment.

The Federal Railroad Administration has been helping investigate several high-profile crashes in recent months, including the Jan. 31 collision in Crozet, Va., of a truck and an Amtrak train carrying members of Congress. The agency has been without a permanent leader as the Trump administration and Senate Minority Leader Charles E. Schumer (D-N.Y.) have sparred over the funding and the future of a major rail improvement initiative known as the Gateway Program.

Schumer has put a hold on the nomination of Ron Batory, a longtime rail executive, to be administrator. After the Crozet crash, Deputy Transportation Secretary Jeffrey A. Rosen asked Schumer “in the interest of public safety” to “set aside wholly unrelated issues” and confirm Batory.

Daniel Stevens, executive director of the Campaign for Accountability, an ethics group, said last week that Hall lacked any experience “for the critical job of overseeing America’s rail network” and also appears to have been “holding down a second job as a Mississippi public relations consultant in violation of federal law.”

In August, Hall was quoted by a local television station, WJTV in Mississippi, as a representative of the Madison County Sheriff’s Department. The short item concerned a police dispatcher being charged with driving under the influence.

The FRA did not answer questions by a Washington Post reporter on Jan. 23 about whether Hall had severed ties with the sheriff’s department.

In his federal ethics filing, Hall noted that his sources of income had included the public relations and political firm where he had served as president, Strategic Marketing Group; the Madison County Sheriff’s Department; a local district attorney; and KDL Solutions, which says it develops products and services for the “Active Shooter training industry.”

Hall’s July ethics disclosure referred to Strategic Marketing Group as an “individually owned consulting business that will remain dormant during Federal service.”

Asked about Hall and the Strategic Marketing Group, a spokesman for Chao’s office said Wednesday that Hall “has exceeded federal legal requirements.”

Hall signed a presidential ethics pledge “and is recused from any particular matter involving specific parties directly and substantially related to their former employer or clients from the applicable time frame,” the spokesman said.

Stevens said that federal officials above a certain salary level are legally prohibited from having outside employment, and being quoted in August as a spokesman creates a potential legal problem for Hall.

On Saturday, a Transportation Department spokesman said allegations of outside work, “if true, are troubling.”

Responding to questions on Hall’s qualifications to be deputy administrator — and, for a time, acting administrator — of the safety agency, a Chao spokesman pointed to Hall’s work in Washington and Mississippi. Hall had an earlier stint at the Federal Railroad Administration as an intern and served as public affairs director for former Mississippi governor Kirk Fordice (R), for whom the spokesman said he performed “work across transportation sectors, including rail, on issues ranging from infrastructure, safety and communications, both in Mississippi and the surrounding region.”

Juliet Eilperin, Aaron Davis and Lori Aratani contributed to this report.