The Postal Service was not exactly thrilled to discover the Postal Service.

When it learned that a West Coast band was sharing its name, the government agency's lawyers sprang into action, demanding that the group find a different way to refer to itself. But more than a year later, the two are in business together.

The U.S. Postal Service -- the one that delivers your mail -- inked an unusual deal last week with the critically acclaimed, if somewhat obscure, indie-rock act that both parties hope will give them an edge in their respective industries.

The band gets to keep its name and sell its music on the agency's Web site. The band, which rarely performs live, will play at the agency's executive conference next week.

The agency, for its part, gets another way to drive traffic to its site, where it sells a number of more traditional products, such as stamps. But most important, the agency, which is fighting competition from e-mail, gets what it hopes will amount to a foothold among the band's young fans.

"It gives visibility to our name to those who are younger and use the Internet," USPS spokesman Jim Quirk said.

It is a happy ending -- or, at least, a three-year licensing agreement -- to a story that began with the band's small Seattle-based record label, Sub Pop, contemplating a seemingly impossible legal fight against the billion-dollar agency.

The band consists of two men, who, several years ago, began a long-distance collaboration. Ben Gibbard, who lives in Seattle, would record vocals and guitar on a compact disc and snail-mail it to Jimmy Tamborello. Tamborello, who lives in Los Angeles, would add electronic beats and mail the disc back for more tinkering. And thus the name: the Postal Service.

Their record, "Give Up," was released early last year and was quickly embraced by critics and the hipster set. The album shot up the college music charts, selling more than 390,000 copies.

Then, last summer, the USPS's cease-and-desist letter arrived.

By then, said Tony Kiewel, an artist and repertoire representative at Sub Pop, the band had built something of a brand name -- and changing it, he said, would be a "momentum killer." And would those CDs that had been made have to be destroyed?

The company, hoping to avoid an expensive legal fight, proposed working together. USPS had signed cross-promotional deals before. There was one with the folks behind the movie "Dr. Seuss' Cat in the Hat." Another with "Shrek 2." The agency sponsored cycling champ Lance Armstrong. But it never literally shared its name with anyone -- and had never signed a deal with a rock band whose antics, for all the agency knew, could end up in the papers a la singer Courtney Love.

Still, the agency was interested. Its representatives met with the band -- to get a sense of who the members were -- and screened their lyrics. The USPS, by all accounts, was not concerned with the band's politics. Gibbard, who also sings in the band Death Cab for Cutie, performed at anti-Bush concerts organized by the liberal group But USPS was more concerned with possibly offensive lyrics that could land its executives before Congress, trying to explain how they could share the agency's good name with such a group.

In the end, the band's wistful-but-danceable pop songs proved acceptable. "As far as we're concerned, this is a good, reputable band," USPS's Quirk said.

Ben Gibbard, at the microphone, partners with Jimmy Tamborello to give the Postal Service its distinctive sound.