A Metra worker was killed and another was injured in an explosion Saturday morning in the Old Irving Park neighborhood on the Northwest Side.

About 11:30 a.m., the men were welding rail together on the Milwaukee District North line in the 4500 block of West Byron Street when a “buildup” caused a tank of gas that was stored on a truck to explode, according to Metra spokeswoman Meg Reile.

The blast happened near the Grayland Station at 3805 N. Kilbourn Ave.

Bruce Marcheschi, Metra’s incoming chief operations officer, said the work performed Saturday followed up from last weekend, when track diamonds were replaced. The crew Saturday was doing routine maintenance when the incident happened, Marcheschi said.

Both men were taken to Illinois Masonic Medical Center, where one of them died,  authorities said. The other man was in stable condition.

The worker who died was 37-year-old Omar Solis, who was pronounced at 12:11 p.m., according to the Cook County medical examiner’s office. An autopsy was scheduled for Sunday.

A nearby resident, Frederic Sender, says he was in his garage when he heard a loud boom about 20 feet behind his house. Sender says the explosion knocked his 2-year-old son to the ground.

But knowing that crews had been working on the railroad tracks by his house in the Old Irving Park neighborhood, he thought nothing of it — sometimes railroad ties or other equipment are dropped.

“Hearing the boom wasn’t unusual until afterward,” Sender said. “Once we heard the sirens, we knew.”

Marcheschi said they’re doing a “deep dive into what took place.”

“It’s a hard thing when something happens to one of your own employees,” Marcheschi said.