Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

A federal law enforcement officer who had recently been placed on administrative leave is in custody after a trio of shootings paralyzed the Washington, D.C., suburbs.

The shootings happened over two days, starting with a homicide in a high school parking lot Thursday, and ending with gunfire at two Maryland shopping centers eight miles apart Friday that killed two people and injured two others.

Police arrested federal officer Eulalio Tordil, 62, who they suspect in all three shootings, Friday afternoon. Tordil had been on the run after he allegedly gunned down his estranged wife in her car Thursday in a high school parking lot in Beltsville, Maryland, while she was picking up her daughters.

Police spotted Tordil near the scene of the second shopping center shooting Friday and plainclothes officers had him under surveillance for a little under an hour before moving in to arrest him at around 2:50 p.m. authorities said.

“Our fear was that he was armed, and since he had already shot four people today we certainly did not want to have any other bloodshed here,” Montgomery County Police Chief Tom Manger told reporters.

Investigators haven't found any past connection between the victims Friday and Tordil, Manger said.

Friday's violence started sometime before 11:15 a.m. at the Westfield Montgomery Mall in Bethesda, where a police officer came upon two men and one woman who were shot in the parking lot, Montgomery County police said.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

One man later died at the hospital, police said. Another man was in grave condition.

While police were at that scene, a 911 call came in of another shooting in the parking lot of a Giant Food supermarket at the Aspen Hill Shopping Center in Silver Spring, where a woman was found in her car fatally shot, Manger said.

Tordil, of Adelphi, Maryland, was spotted by police Friday afternoon at a Dunkin' Donuts across from the Giant Food after authorities found a vehicle that matched the description from the Thursday's killing in Prince George's County, Manger said.

He was watched by plainclothes officers, and police rammed Tordil’s car when he returned to the vehicle. He was taken into custody without incident, Manger said. A gun was found in the car, police said.

Thursday, Tordil allegedly gunned down his estranged wife, Gladys Tordil, at around 4:30 p.m. outside a high school in Prince George’s County. A bystander was shot in the shoulder.

Prince George's County and Montgomery County police had been hunting for Tordil since her shooting.

"It's tragic that we were not able to intervene without additional victims being harmed," Prince George's County Police Chief Henry Stawinski said. "But I am pleased with the fact that this individual has been apprehended and now we can restore some degree of peace."

"Prince George’s County police officers, myself, we have not slept since last night in an effort to apprehend this individual," Stawinski said.

Three protective orders had been issued against Tordil, barring him from being near the high school where Gladys Tordil was shot. The protective orders involved allegations of sexual abuse against two minor children, an official with Maryland's Administrative Office told NBC News.

Tordil is charged with first-degree murder in the death of his estranged wife, Prince George's County police said later Friday. Charges in Montgomery County are pending, police in that county said.

Tordil is a law enforcement officer with the Federal Protective Service, a Homeland Security agency responsible for security at federal buildings and some foreign embassies in the Washington area.

He was put on administrative duties in March after a protective order was issued against him, Homeland Security officials told NBC News. He was later placed on administrative leave and required to surrender his government-issued weapons, badge, and credentials. Any weapons he may have used were therefore obtained on his own, federal officials said.

Officials say his job was supervising contract employees who handle security at federal facility entrances.

Police take Eulalio Tordil, 62, a suspect in three fatal shootings in the Washington, D.C., area into custody in Bethesda, Md., Friday, May 6, 2016. Alex Brandon / AP

The first shooting Friday happened after a "confrontation" in the parking lot, Montgomery County Police Assistant Chief Darryl McSwain.

"One individual was shot. Two other individuals came to that person's aid" and were also shot, McSwain told reporters.

Police do not believe the victims and the shooter knew each other, "but we are certainly looking at all angles," McSwain said.

Tordil will appear in court Monday at 1 p.m.