A feisty little pooch took on a 400-ton Metro-North train on Tuesday — bravely running with it from the South Bronx to Manhattan.

“She was just running like she didn’t have a care in the world,” said engineer Joseph Delia, 52, who was at the controls of the 10:39 a.m. Hudson Line train to Grand Central.

The speedy pup began the epic chase at the busy Mott Haven Junction, racing alongside the train as it made its way out of The Bronx.

Running on a parallel track, she got past the lead car while the train was at a red signal, and found herself racing to keep ahead of it. Twice she fell between the ties, and Delia hit the brakes.

“The dog was in front of me, running in front,” said Delia, an avid dog lover who alerted the rail command center and MTA Police. “Oh, my God, I was going real slow.”

Delia was worried she would hit the third rail.

“She’s not a very big dog. I was worried she wouldn’t make it and get electrocuted,” he said.

When a conductor told passengers why the train was going so slow, riders flocked to the front to see the courageous canine.

She made it safely to the 125th Street station in Harlem, where MTA cops Luis Alvarez and Errold Borges, along with a station worker, went toward the tracks to grab her. But before they could make it down the stairs, she bounded right to them.

The passengers were ecstatic about the happy ending.

“They were hooting and hollering,” Delia told the Post. “They were all cheering.”

Emergency Service cops then checked out the dog and took her into a patrol car.

“Very friendly dog,” said Alvarez. “It had a limp, was docile, wagging her tail.”

MTA workers named her Tie — for all the railroad ties she crossed — and she is being cared for by Animal Care & Control.

If an owner cannot be located, Animal Care & Control will look for someone to adopt her.

Delia said he has never seen anything like this in his 20-year career. “That’s the most unusual thing,” he said.