It is the finest collection of modern art anywhere outside Europe and the US, boasting works by Jackson Pollock, Francis Bacon, Andy Warhol, Edvard Munch, René Magritte and Mark Rothko.

But the pieces have been stacked in the basement of Tehran's Museum of Contemporary Art for more than 30 years, gathering dust in storage. Censors in Iran classed some as un-Islamic, pornographic or too gay, and they have never been shown in public. Others have been displayed only once or twice.

But now a number of the collection's paintings are on show for the first time in Tehran as part of the museum's Pop Art & Op Art exhibition, featuring works by Warhol, David Hockney, Roy Lichtenstein, Victor Vasarely, Richard Hamilton and Jasper Johns.

"Many of the works in the exhibition are shown for the first time," Hasan Noferesti, the museum's director for art programmes, told the Mehr news agency. "The exhibition aims to show the evolution of these artistic movements."

More than 100 pieces from the museum's remarkable collection are on display, according to Mehr, along with a series of works from Mexico that have been dedicated to the museum in commemoration of the 100th anniversary of the Mexican revolution and the 200th anniversary of the country's independence.

James Rosenquist, Jim Dine, Larry Rivers and RB Kitaj are among other artists whose works are in the exhibition, which runs until mid-August.

Iran's unique hidden treasure was bought before the Islamic revolution, under the supervision of Farah Pahlavi, the former queen of Iran, who fled the country with the late shah Mohammad Reza Pahlavi in 1979.

The 38-year reign of the shah, self-proclaimed kings of kings, came to an end after Ayatollah Ruhollah Khomeini returned from exile to Tehran receiving a hero's welcome and founded the Islamic republic.

The collection includes Pollock's Mural on Indian Red Ground, considered to be one of his most important works and estimated to be worth more than $250m, as well as important pieces by Picasso, Van Gogh, Monet, Pissarro, Renoir, Gauguin, Toulouse-Lautrec, Degas, Whistler and Marcel Duchamp.

There are even pieces by artists whom the former empress met in person, including the Russian-French painter Marc Chagall and the English sculptor Henry Moore. The collection is thought to be worth more than $2.5bn.

Speaking to the Guardian, Pahlavi explained that the collection was bought during Iran's 1970s oil boom. "Our oil revenue had significantly increased and I spoke to [the shah] and Amir-Abbas Hoveyda [then prime minister], and told them that it was the best time to buy some of our ancient works both internally and from outside.

"I thought how good it would be to have a museum where we could put the works of our contemporary artists. Later I thought, why shouldn't we include foreign works. This is how it all started … at that time our curators and collectors were mostly interested in traditional art and not so much in the modern art."

Pahlavi's interest in western art is believed to derive from her education in France.

Kamran Diba, an Iranian architect and a cousin of the queen, was commissioned to design the museum in the heart of the capital and later selected the works with help from various people, including the presidents of Christie's and Sotheby's.

Pahlavi said: "I was very worried for the fate of those paintings during those events [at the time of the revolution], I was worried that the revolutionaries would destroy them. But fortunately the museum staff protected them in the basement.

"Some years ago the director of the museum showed some of the pieces and made a catalogue listing the works. I'm happy that people have realised what was hidden there for years."

Between 1997 and 2005, during the mandate of the former reformist president Mohammad Khatami, when restrictions on art were temporarily relaxed, Alireza Samiazar, then head of the museum, struggled to secure permission for the first display of some of the works.

In 2005, to the dismay of the regime's hardliners, a large number of the paintings were brought out for an exhibition. That show sparked controversy. Francis Bacon's Two Figures Lying on a Bed with Attendants, with seeming homosexual content, was deemed inappropriate and removed from the exhibition. However, many contentious works survived the censors. Andy Warhol's portraits of Mick Jagger and Marilyn Monroe are in Tehran and his paintings of Mao Zedong have been put on display in full for the first time in the pop art exhibition.

Despite the contempt of Tehran's rulers for western art, the collection has been safely guarded – bar a Warhol portrait of Pahlavi herself, which, she said, had been cut with a knife.

In 1994 the museum exchanged one of its many remarkable paintings – Woman III, by the Dutch-American expressionist Willem de Kooning – for a rare illuminated volume of Shahnameh, an ancient Persian poetry book, which belonged to the American art collector Arthur Houghton, because the painting had shown too much nudity in the eyes of the authorities.

The swap infuriated many, including Pahlavi. "If they were really interested in Shahnameh, couldn't they pay $6m and keep De Kooning's painting? The US businessman David Geffen, who bought the painting for some $20m, sold it for $110m few years ago. The De Kooning exchange is the sole exchange they've done so far and I hope it remains the last one."

Of the many ironies surrounding the artwork is the fact that Iran's powerful Guardian Council, a group of clerics, intervened a decade ago to forbid the selling or exchange of the works because, they said, trade in un-Islamic and pornographic works was prohibited.

Ali Amini Najafi, an Iranian art critic based in Germany, said: "The works in the collection are not randomly or arbitrarily chosen, it is clear that people involved in selecting them had a consistent plan to pick relevant and significant samples to depict the evolution of modern art and also to make sure that all movements from impressionists to pop art are represented.

"This collection was gathered at a defining moment of our history when Iranians were taking distance from their traditional past and were showing curiosity with modern art."