Jack Ma, the founder and CEO of Chinese e-commerce giant Alibaba, is keen on buying Yahoo Inc if the opportunity presents itself and has held discussions with other potential buyers about options.

Asked whether Alibaba might like to pick up the ailing U.S. Internet company, Ma told an audience at Stanford University that he would be very interested in Yahoo.

The former English schoolteacher later added that, were he to have his way, he would be eager to acquire all of Yahoo, not just the stake it owns in Alibaba.

The whole piece of Yahoo, Ma said in answer to a question from the audience about what part of Yahoo he was interested in. China is already ours, right? It's already in my pocket.

Yahoo shares leaped 5 percent to $13.80 in after-hours trading.

Acquiring Yahoo could help Ma expand his online empire into one of the world's most important Internet markets.

Ma also said he planned to spend the next year in the United States learning more about the country and the market. An Alibaba spokeswoman said Ma would be based in the San Francisco Bay area, but would travel across the country and would continue his operational duties as chairman and CEO of the Alibaba Group.

Ma, who was speaking at the China 2.0 conference at Stanford, said he had not visited Yahoo to discuss a deal since he arrived in the United States 15 days ago.

We are probably one of the very few companies that really understand Yahoo USA very well, he said, referring to his company's long-running relationship with Yahoo, which dates back to 2005.

That relationship has grown strained in recent years. Ma's attempts to buy back some of Yahoo's roughly 40 percent stake in his company were rebuffed by former Yahoo Chief Executive Carol Bartz, who was fired earlier this month.

Yahoo has received inquiries from multiple parties about potential options, but the struggling company is expected to take months to decide its future. It has retained Allen & Co to help it conduct a long-term strategic review.

Private equity firm Silver Lake Partners is among the parties that have been in touch with Allen & Co, according to a source familiar with the matter.

Yahoo's board has also started to look for a permanent CEO, but provided no details on its progress, or whether it hired an executive recruiting firm to oversee the search.

At an all-hands meeting the day after Bartz was fired, Yahoo founder Jerry Yang said the company was not for sale, according to another source familiar with the matter. But analysts are staking good odds that Yahoo could eventually be acquired.

Ma said he couldn't predict when a deal to acquire Yahoo might take place.

It's more complicated than we thought. And there's so many people interested in that. And we are also talking to them and they are talking to us, he said.

I cross my fingers, just to say we are very, very interested, Ma said.