Eight subway cars in Brooklyn have been covered by graffiti in memory of two Big Apple street artists who died last week — and it will cost thousands to clean up the spray-painted tribute, officials said.

“NYC Transit personnel discovered this vandalism — which put an entire train out of service and will cost thousands of dollars to restore,” MTA spokesman Shams Tarek told The Post in a statement.

He added that the agency is “fully cooperating with the NYPD,” which is leading a criminal investigation into the vandalism the MTA discovered in Bushwick on the J line Monday morning.

“There are no arrests at this time and the investigation continues,” an NYPD spokesperson said.

Meanwhile, the train will remain out of service on the J-M-Z line until the cleanup is completed, officials said.

There have been 285 “major graffiti hits” on trains through Sunday, Tarek said. In 2018, there were 443 such incidents, he said.

NYC Transit has spent $533,375 to clean up graffiti this year, he said. In 2018, that figure was $610,956.

“We attribute the reduction of major hits in 2019 compared to 2018 to the takedown of some international graffiti rings by NYPD with NYCT’s cooperation,” Tarek said.

The colorful tribute was for Matthew “ZEXOR” Rodriguez, who died Thursday at age 29, according to The Source.

The son of Brooklyn graffiti legend ASP WTO had just returned from the Art Basel art fair when he died from complications due to sleep apnea, the Bowery Boogie reported.

The other graffiti artist was PHASE2, aka Bronx native Lonny Woods, who died last week at age 64 after suffering from Lou Gehrig’s disease, the Gothamist reported.

“It’s very unusual to see a train leave the yards with a top-to-bottom, end-to-end burner,” said the Gothamist’s Jake Dobkin.

“Normally they clean them before they leave, so the only shots you see are the ones the German tourists take themselves after they bomb the train, but here the train appears to have left the yard, so that’s cool,” he said.