When the letter arrived in 2007 inviting Tod Williams and Billie Tsien to enter a select competition to design a new Barnes Foundation in Philadelphia, the husband-and-wife architectural team were momentarily stumped. Yes, they were well known among the cognoscenti, who admired their artisanal devotion to their projects. Yes, their new Folk Art Museum in Manhattan had just opened to rave reviews, raising their profile. And, yes, they had just made a good impression in Philadelphia with their elegant design for a small engineering building at the University of Pennsylvania.

The problem was that Williams and Tsien had never visited the Barnes Foundation and its fabulous art collection in suburban Merion.

Embarrassed by the lapse, the pair "hightailed it out there," recalled Williams, now 68. "I'd known about it since I was at college" at Princeton University, he admitted, but "it always seemed like a hassle to get to." He chided himself for his "intellectual laziness" and quickly acquired a pair of tickets to visit the galleries.

The Barnes worked its usual magic on Williams and Tsien. At the entrance, Jacques Lipchitz's stylized ceramic bas-relief stopped them in their tracks. They were left dizzy by the sensory overload of Matisses and van Goghs and Renoirs. And yet the element that intrigued them most was the one that perplexes many visitors: the antique hinges and brass implements that founder Albert C. Barnes had salted among the paintings. Albert Barnes, they realized at once, was a kindred spirit.

Barnes was a modernist who was intensely drawn to handcrafted objects. So are Williams and Tsien, who practice what might be called slow architecture. They pursue just a few projects at a time, so they can pay close attention to the details, etching and scoring and hammering every surface of their buildings as if they were crafting fine leather bindings or handmade paper. While they don't apply ornamentation in the same way that a neoclassical architect might have, they enliven their simple forms with the strategic use of rich color, unusual glazes, metalwork, and lavishly textured masonry.

Bigger names were considered for the coveted Barnes commission, including Rafael Moneo and Thom Mayne, but the board decided instead to go with the pair's small New York-based firm. It wasn't just their sensibility about craft and detail; the board also felt "they understood the complexity of the project better than anyone else," Aileen Kennedy Roberts, who chairs the building committee, has said.

Without a doubt, the $150 million Barnes building, which opens to the public May 19, was more complex than most museum projects. It was no secret to Williams and Tsien that the foundation's decision to relocate to Philadelphia was a controversial one, decried in the world's art press as a desecration of Albert Barnes' unique vision.

Because of promises made during the lengthy court battle, designing the new Barnes was a herculean assignment fraught with character-testing obstacles. For starters, the architects were obliged to re-create the interiors of the Merion galleries, inch-for-inch, inside the new building. Not just room dimensions, either. All the paintings, metalwork, and other objects would be placed in precisely the same arrangement as they had been in Merion. The imposition of that single requirement would ripple through the rest of the design, and would profoundly dictate the look and function of the new building on the Benjamin Franklin Parkway.

For most modern architects, the idea of replicating any building, even one as fine as Paul Cret's exquisitely proportioned 1920s gallery, is anathema. Some art-world figures were appalled to hear that Barnes' antiquated, salon-style hanging scheme would also be replicated, although others saw it as crucial to understanding the collector's intentions. Yet for the Barnes to succeed in its new location, the board understood that the building had to be a serious work of architecture, not a pastiche.

Many argued it was an assignment that simply couldn't be done well. "A faux Barnes is going to be a disaster, a compromise that will satisfy no one," said Lee Rosenbaum, who writes the CultureGrrl blog for the Arts Journal, and has been critical of the move.

Tsien, 62, remembers "feeling a mix of elation and fear" after being named the project's architect. "Our first thought was, 'What an amazing gig!' But we were also concerned about approaching the project with integrity."

For their first meeting with the selection committee, the pair had roughed out a potential strategy. But how to express it? In a moment of inspiration, one of them - it's not clear which - grabbed a piece of paper and sketched a hoagie, with lettuce and tomatoes peeking out from the bread. The hoagie was sliced vertically to create three distinct sandwiches. They wanted to show how the galleries might be improved without violating the court pledge.

In Merion, they argued, the dense assault of impressionist, postimpressionist, and early modern works was both a strength and a weakness. From the moment you walked in the door, and made your way through a tiny vestibule, you were overwhelmed by the concentration of masterpieces. There was just too much data. What Williams and Tsien were proposing was a strategy to keep each room in the galleries the same, yet stretch out the total experience so visitors could absorb the art at a more leisurely pace. "We wanted people to be able to drop their shoulders, relax," explained Williams.

In their drawing, the hoagie represented the long Merion gallery building. They would keep the Merion "bar" intact, but make two "slices" - new spaces that would be inserted between the gallery rooms. One would end up as an interior garden, bringing soft natural light down to basement level, where the library and lounge are located. The other slice provided much-needed classroom and meeting space. The rooms in between would remain identical to those in Merion.

The hoagie solution only addressed one aspect of the problem, however. As Williams and Tsien quickly discovered, it wasn't enough to hang the paintings in the same spot or to arrange the galleries in the same order. Unlike most museums, a visit to the Barnes isn't about seeing precious artwork as individual objects.

The Barnes is an ensemble. The way Albert Barnes arranged his collection on the walls is as much a work of art as the individual pieces. It was critical that visitors move through the galleries in the order he intended.

For Williams and Tsien, that meant two things: First, they needed to situate the Merion "bar" so that the main gallery - with its famous Matisse mural and three enormous French windows - faced south, as it had in Merion. Next, they had to make sure that visitors started their journey by walking into this important room first and seeing the landscape outside through those windows.

It sounds easy, but solving this piece of the puzzle would inform the location of every other part of the building.

At this point, the architects still had to figure out the relation of the "hoagie" to the rest of the new Barnes, which would house the modern museum services the Merion Barnes lacked. The list was long, from a basic ticket lobby to a cafe, gift shop, auditorium, conservation lab, and offices for the Barnes' growing staff.

Searching for a solution, the architects returned to the word that Tsien voiced when she first heard they were being considered for the job: Integrity.

One way to pay homage to Barnes' vision was to segregate the Merion galleries from the rest of the new building. Williams and Tsien hit on the idea of wrapping an L-shaped wing around the Merion bar, located on the south side of the Parkway site. The two structures would be virtually separate structures, barely kissing at a single point on the east facade.

One of the benefits of this hands-off arrangement is that it created a spacious, light-filled court between the old and the new. The board saw another advantage to the plan: The Barnes could seal off the galleries, with their precious artwork, during private events, which are an increasingly important source of revenue for arts institutions.

There was one problem: Where would you enter the building?

The Parkway was intended as Philadelphia's great cultural boulevard, yet it hasn't lured a new institution in decades. The Barnes was an opportunity to put a new front door on the block, energizing what often feels more like a highway than a city street.

But the Barnes felt the collection should come first. Since visitors had to enter the main gallery of the Merion bar from the north, to get the views through the French windows, Williams and Tsien reasoned that it made sense for them to enter the whole building from the north side, along Callowhill Street.

The decision seemed a blatant violation of Urban Planning 101. Williams, however, defends the solution. "We wanted there to be a delay in the procession," he explained. "I'll go down in flames on the rightness of the idea."

Once the decision was made, all the other parts of the plan fell into place. The architects got down to doing what they do best, crafting the details.

As difficult as the architectural constraints were, they were hardly the only difficulties the architects faced. They were publicly criticized for accepting the Barnes commission. Even before they were chosen, critics like Rosenbaum were urging "architects of good conscience" to refuse the Barnes project.

After accepting the commission, Williams and Tsien said, they were snubbed at parties. "People made snide comments to us," Tsien recalled. "There was a shocking amount of animosity."

And that was before the Folk Art Museum declared it was insolvent and would have to sell its building to MoMA. Some art critics, like New York Magazine's Jerry Saltz, blamed the building's closed-in architecture for the little museum's demise and predicted that the same fate awaited the Barnes.

Then there was the movie The Art of the Steal, which helped bring the Barnes controversy to a wider public.

Williams and Tsien said they never stopped believing in the Barnes project and its mission, which includes using the collection to educate schoolchildren who might never be exposed to art.

"All the furor will die down" one day, Williams predicted. And, Tsien added, "In the end, the back story will not be as important as the front story."