In the world of Internet search,

Google

(GOOG) - Get Report

and

Yahoo!

(YHOO)

have pretty much claimed the largest market shares, while other companies such as

Ask Jeeves

(ASKJ)

, while holding their own, have been forced to find new tricks to keep revenue growing.

Ask Jeeves has been working on a couple of such tricks. First, the company said it is tweaking Bloglines, a unit whose Web-based blog aggregator is popular among geeks, to search blogs more thoroughly and open it up to more ads. Now, AskJeeves is working with peer-to-peer software company

BitTorrent

to place sponsored links on a new search engine that BitTorrent is about to launch.

To understand how gutsy a move this is, it helps to review what BitTorrent is about. Privately held BitTorrent developed a peer-to-peer technology that, like Kazaa Media Desktop and the original version of

Napster

(NAPS)

, enabled file-sharing, including song and video files that the music and film industries have insisted are illegal to download for free.

Unlike Kazaa and its kin, BitTorrent breaks the bottleneck created when uploading a file in big demand. It solved the problem by breaking files, no matter how large, into many smaller files so they can be reassembled into an organic whole. After BitTorrent appeared, under-the-radar sites flourished, each allowing speedy access to both legitimate releases and unauthorized versions of television shows, music albums and movies. Music and film associations have pressured several such sites into shutting down.

Another key difference with Kazaa is that BitTorrent never allowed searching of content -- that is, until now. According to the site Wired News, BitTorrent is launching an ad-supported search engine that will index movies, music and software available through the BitTorrent protocol. And who's going to put the ads on this renegade search engine? That's right -- Ask Jeeves.

The company's partnership is the strongest support that a U.S. company has formally given to a file-sharing technology since the venture firm

Hummer Winblad

backed Napster several years ago. Hummer invested $13 million in Napster only to see its original software squashed by the music industry.

Ask Jeeves is making no such investment, but is helping to monetize a controversial technology. Depending on how BitTorrent evolves, and how the inevitable legal battle will play out, the partnership could be a lucrative one for Ask Jeeves -- or a source of legal migraines.

So here are a couple of questions for the Internet's smiling butler: Does Ask Jeeves know what it's getting into? Is the company extremely cunning or extremely desperate?

Jeeves wouldn't answer those questions, but spokeswoman Colby Zintl said the company didn't anticipate getting caught in any legal snarls. "We're just providing a Web search and sponsored links," says Zintl. "We're not enabling the file-sharing, so we don't see it as a conflict. We'll be watching any activity in the courts before deciding whether it's a concern."

Ask Jeeves syndicates Google's sponsored link ads and its own search technology to hundreds of Web sites, including

Mamma.com

(MAMA)

,

BellSouth

(BLS)

, and

Cnet Networks

(CNET) - Get Report

. Similarly, the relationship with BitTorrent will rely on AdWords, giving Google a share of the revenue, while allowing BitTorrent users to search the Internet using Ask Jeeves' search algorithms.

Should there be any lawsuits that result in a ruling against BitTorrent, they may take a page from the resuscitated Napster and try to work within the entertainment industry's playbook. But between now and the time when the outcome is clearer, AskJeeves has, between BitTorrent and Bloglines, the ability to win strong credibility among the finicky tech community.

And that credibility could lead to new deals down the road. In the meantime, Ask Jeeves likely will be plotting an escape hatch in case things get too dicey.