Amazon.com Inc on Monday agreed to pull advertisements for a new television show featuring Nazi-inspired imagery from New York City's subway system, a transit official said, hours after Mayor Bill de Blasio called on the company to do so.

The advertisements for "The Man in the High Castle" completely wrap the seats, walls and ceilings of one train on the heavily utilized shuttle line that connects Times Square and Grand Central Terminal in midtown Manhattan.

The show depicts an alternate reality in which Nazi Germany and Japan have divided control over the United States after winning World War Two.

The advertisements include a version of the American flag with a German eagle and iron cross in place of the stars, as well as a stylized flag inspired by imperial Japan.

Representatives for Amazon and its television production arm did not respond to requests for comment.

The shuttle train ads had been scheduled to run until Dec. 6, according to the Metropolitan Transportation Authority. In addition, Amazon has paid for 260 subway station posters to be displayed until Dec. 6.

An MTA official who spoke on condition of anonymity said Amazon had asked for the shuttle train advertisements, but not the posters, to be removed.

In a statement earlier on Monday, de Blasio called on Amazon to remove the shuttle train advertisements, calling them "irresponsible and offensive to World War II and Holocaust survivors, their families, and countless other New Yorkers."

The MTA had said the advertisements do not violate the agency's content-neutral guidelines, which ban political ads.

The show is an adaptation of a Philip K. Dick 1962 novel, "The Man in the High Castle" that describes a version of history in which the Axis powers win World War Two and divide the United States into a Nazi-controlled East and a Japan-run West. All 10 episodes became available on the Amazon Prime streaming service on Nov. 20.

Frank Spotnitz, the show's creator and executive producer, told Entertainment Weekly he agreed with critics that the advertisements could be seen as offensive.

"It's very difficult with a show with subject matter like this to market it tastefully, so I understand they're walking a very difficult line," the magazine quoted him as saying on its website. "If they had asked me, I would have strongly advised them not to do it."