SÃO PAULO, Brazil — The arrival of six 20th-century paintings, mostly portraits, on loan from the Tate Modern in London was to have been a cultural coup for the São Paulo Art Museum as it expanded its international art exchange program.

Instead it has become a messy legal battle — one that has jeopardized the exhibition and other major art programs across the country.

When the six pieces arrived in May, officials at an airport in Sao Pãulo presented the museum with a $320,000 bill for unloading and storage — triple the total budget to mount the exhibition — to be paid before the paintings could be retrieved.

The cargo fee for paintings had been assessed according to their weight. Now, some of Brazil’s main international airports have begun charging a percentage of the paintings’ values, which increased cargo fees from a few dollars to hundreds of thousands of dollars — a prohibitive expense for art venues.