Updated 4 p.m. PST with further Yahoo comment.
The ads are part of a test that began in August and ends in December, Yahoo said in a statement. One example we saw here at CNET shows an ad for MasterCard.
"Ads in Yahoo Messenger will allow us to put even more resources behind developing and delivering valuable free features and services," Yahoo said. "Yahoo Messenger is a free service to our users, and our goal is to provide a useful and relevant experience while ensuring this is a profitable business for Yahoo. Yahoo is inherently an advertising-driven business."
The company wouldn't comment yet on what happens after the test is finished. "Plans will be made when the testing is concluded," the company said.
Yahoo laid off 1,520 employees last week and is in the midst of a review of all its business units to see which should be preserved. The company is under fierce financial pressure that only got worse with the recession and increasingly gloomy forecasts for online advertising.
Google shows ads in Gmail that are selected on the basis of e-mail content, but the Yahoo IM ads aren't selected on the basis of context, Yahoo said.
"The ad shows at most once per day per user and scrolls away" as an IM conversation continues, Yahoo said. "Right now the ads are being tested in versions of Yahoo Messenger 7.0 and above."