NEW YORK >> Police arrested a suspect Monday in the brazen Manhattan killing of UnitedHealthcare’s CEO after a quick-thinking McDonald’s employee in Pennsylvania alerted authorities to a customer who was found with a weapon, mask and writings linking him to the ambush.

The chance sighting at the restaurant in Altoona led to a dramatic break in a challenging but fast-moving investigation that had captivated the public in the five days since the shooting that shook the health insurance industry.

The suspect, identified by police as 26-year-old Luigi Nicholas Mangione, had a gun believed to be the one used in last Wednesday’s shooting of Brian Thompson, as well as writings suggesting anger with corporate America, police said.

Mangione was taken into custody about 9:15 a.m. after police got a tip that he was eating at a McDonald’s in Altoona, Pennsylvania, police said.

“He is believed to be our person of interest in the brazen, targeted murder of Brian Thompson,” NYPD Commissioner Jessica Tisch said.

Mangione had clothing and a mask similar to those worn by the shooter and a fraudulent New Jersey ID matching one the suspect used to check into a New York City hostel before the shooting, Tisch said.

NYPD Chief of Detectives Joseph Kenny said Mangione was born and raised in Maryland, has ties to San Francisco and a last known address in Honolulu, Hawaii. A message left Monday with a Philadelphia-area phone number connected to Mangione was not immediately returned.

He was being held in Pennsylvania on gun charges and eventually will be extradited to New York to face charges in connection with Thompson’s death, Kenny said.

Police found a three-page document with writings suggesting that Mangione had “ill will toward corporate America,” Kenny said.

The handwritten document “speaks to both his motivation and mindset,” Tisch said.

Mangione had a ghost gun, a type of weapon that can be assembled at home from parts without a serial number, making them difficult to trace, investigators said.

“As of right now the information we’re getting from Altoona is that the gun appears to be a ghost gun that may have been made on a 3D printer, capable of firing a 9 mm round,” Kenny said.

Officers questioned Mangione, who was acting suspiciously and carrying multiple fraudulent IDs, as well as a U.S. passport, Tisch said. Officers found a suppressor, “both consistent with the weapon used in the murder,” the commissioner said.

NYPD detectives and staff from the Manhattan district attorney’s office traveled to Altoona to interview Mangione, Kenny said.

Thompson, 50, was killed last Wednesday as he walked alone to a hotel, where UnitedHealthcare’s parent company, UnitedHealth Group, was holding its annual investor conference, police said.

UnitedHealth Group thanked law enforcement in a statement Monday. “Our hope is that today’s apprehension brings some relief to Brian’s family, friends, colleagues and the many others affected by this unspeakable tragedy,” a company spokesperson said.

The shooting shook U.S. businesses and the health insurance industry in particular, causing companies to rethink security plans and delete photos of executives from their websites.

The shooter appeared to be “lying in wait for several minutes” before approaching the executive from behind and opening fire, police said. He used a 9 mm pistol that police said resembled guns farmers use to put down animals without causing a loud noise.

Mangione attended an elite Baltimore prep school, graduating as valedictorian in 2016, according to the school’s website. He went on to earn undergraduate and graduate degrees in computer science in 2020 from the University of Pennsylvania, a school spokesman said.

One of his cousins is a Maryland state legislator and his family bought a country club north of Baltimore in the 1980s. On Monday, police blocked off an entrance to the property, which public records link to the suspect’s parents. A swarm of reporters and photographers gathered outside.

In the days since the shooting, police turned to the public for help by releasing a collection of nine photos and video — including footage of the attack, as well as images of the suspect at a Starbucks beforehand.

Photos taken in the lobby of a hostel on Manhattan’s Upper West Side showed the suspect grinning after removing his mask, police said.

On Monday, police credited news outlets for disseminating the images and the tipster for recognizing the suspect and calling authorities.

Investigators earlier suggested the gunman may have been a disgruntled employee or client of the insurer. Ammunition found near Thompson’s body bore the words “delay,” “deny” and “depose,” mimicking a phrase used by insurance industry critics.

The gunman concealed his identity with a mask during the shooting yet left a trail of evidence, including a backpack he ditched in Central Park, a cellphone found in a pedestrian plaza and a water bottle and protein bar wrapper that police say he bought at Starbucks minutes before the attack.

On Friday, police said the killer had left the city soon after the shooting. Retracing the gunman’s steps using surveillance video, investigators say the shooter rode into Central Park on a bicycle and emerged from the park without his backpack.

He then walked a couple blocks and got into a taxi, arriving at the George Washington Bridge Bus Station, which is near the northern tip of Manhattan and offers commuter service to New Jersey and bus routes to Philadelphia, Boston and Washington, Kenny said.

The FBI announced late Friday that it was offering a $50,000 reward, adding to a reward of up to $10,000 that the NYPD offered.

Associated Press writers Mark Scolforo, Michael Rubinkam and Maryclaire Dale in Pennsylvania; Lea Skene, in Baltimore; and John Seewer in Toledo, Ohio, contributed to this report.