The NYPD beefed up subway security on Thursday following a dire warning from Iraq’s prime minister that Islamic State terrorists are plotting an attack on transit systems in New York City and Paris.

Hundreds of extra cops were put on overtime, with a heavy presence around Yankee Stadium as throngs of New Yorkers took the subways to see Derek Jeter’s last game in The Bronx.

Counterterrorism cars — called critical-response vehicles — were deployed at transit hubs, along with vapor-detection dogs to sniff out explosives.

“People should go about their business as they normally would,” Mayor Bill de Blasio said. “You may be asked to open your bags. Don’t be alarmed.”

Iraqi Prime Minister Haider al-Abadi said his country’s intelligence division had captured several ISIS fighters who revealed the plots during interrogations.

“I’m receiving accurate reports from Baghdad that there were arrests of a few elements, and there were networks from inside Iraq to have attacks . . . on metros of Paris and the US,” Abadi said at a meeting with reporters at the UN General Assembly in the city.

He claimed that American officials had been warned of the threat, but a senior Obama administration source denied that claim.

“No one in the US government is aware of such a plot, and it was not raised with us in our meetings with Iraq officials here in New York,” the official said.

A White House National Security Council spokeswoman said the plot had not been confirmed but that the NSC is reviewing information from its Iraqi partners.

Gov. Andrew Cuomo and MTA boss Thomas Prendergast rode the E train on Thursday to reassure New Yorkers, while Police Commissioner Bill Bratton and de Blasio took the 5 train.

De Blasio and Bratton said they had met with FBI Assistant Director George Venizelos.

Bratton, echoing federal officials, said the Iraqi intelligence had not been verified and that Abadi’s comments might have been misinterpreted.

“We do not have any confirmed threat directed against New York City or its subway system,” Bratton said.

Cuomo, who said he learned of the supposed threat on Thursday afternoon, had already announced a surge in law enforcement personnel at transit hubs on Wednesday, due to heightened tensions in the Middle East.

At Penn Station, there were three bag-check stations on the concourse level and near the subway entrances, as well as a K-9 unit and two armed soldiers near the Amtrak arrival board.

MTA cops in bulletproof vests and helmets patrolled Grand Central, along with NYPD cops and K-9 units.

Rosemary Vihlein, 30, who works as an office manager in the Flatiron District, said there was a major police presence but she wasn’t worried.

“New York gets threats on a daily basis,” she said. “You can’t let it stop you from living your life.”

Rep. Peter King (R-LI) was worried that the Iraqi leader might have exaggerated the threat.

“If we cry wolf and give out false information, then when a real plot comes, people are not going to listen and innocent people are going to be killed,” he said.

Additional reporting by Kevin Fasick and Kirstan Conley