San Francisco posted solid tourism gains in 2005, drawing in 15.74 million visitors, a 4.1 percent year-over-year increase, the San Francisco Convention & Visitors Bureau said in its annual report released Friday.

The out-of-towners were free with their money. Visitor spending rose 9.5 percent over 2004 to $7.37 billion.

Tourism is San Francisco's No. 1 revenue-generating industry, and the city has been voted the No. 1 travel destination in the United States in a poll in the Conde Nast Traveler magazine for 13 consecutive years and in 17 of the past 18 years.

The industry's gains are filling up San Francisco lodgings. The occupancy rate at hotels in the city in 2005 was 76.4 percent. It's projected that 2006 will come in at about 78 percent, an indicator of an improving economy, said John Marks, president and CEO of the visitors bureau.

"I feel really good I am going to leave when things are on the upswing," said Marks, who is retiring June 30 after 19 years at the post. Speaking at a City Hall news conference with Mayor Gavin Newsom, Marks said a weak spot has been business travel, which has declined in part because of the departure of major employers formerly based in San Francisco, including Bank of America and Chevron.

"That is the one segment San Francisco is challenged in," he said.

By comparison, 40 to 45 percent of New York hotel rooms are sold to business travelers, "people who have to be in New York because they have no choice," Marks said.

Had there not been the loss of business headquarters in San Francisco, the hotel occupancy rate would be 80 percent, said Rick Swig, the visitors bureau chairman.

San Francisco is still digging out of a very deep hole. In a series of downturns beginning in 2000 -- the recession, the dot-com bust, the Sept. 11 attacks -- tens of thousands of jobs were lost and the hotel occupancy rate fell to 65.4 percent in 2002.

"About the only thing that passed us by was locusts and darkness," Marks said. "But we made it through that very difficult period and we are coming back very nicely.

In 2000, visitors to San Francisco spent $7.6 billion, just a little more than the 2005 figure. Hotel occupancy was 81.7 percent.

About 4.5 million visitors checked into San Francisco hotels in 2005 compared with 4.2 million in 2004, up 6.8 percent.

Taxes and fees generated from tourism produced $418 million for San Francisco in 2005, the visitors bureau reported. About 66,315 jobs in the city are directly related to tourism, and 55 percent of the people holding them live in the city. Tourism has a total payroll of $1.8 billion, according to the bureau's report.

The bureau quoted Department of Commerce data that found that San Francisco has passed Miami and Orlando and is now the third most-visited city in the United States for foreign tourists, after New York and Los Angeles. Great Britain sends the most visitors to San Francisco, followed by Japan, France and Australia.

Newsom noted that San Francisco has surpassed Florence to be the second-highest-scoring city in the world, according to the Conde Nast Travel poll, after Sydney.

"We are on your heels," Newsom said, referring to Sydney. "We are going to take out Sydney, in the competitive, appropriate spirit of the word, next year, we hope."

Also Friday, the visitors bureau introduced a Web site, www.onlyinsanfrancisco.com, which includes trip planning, options to purchase hotel accommodations and tickets to attractions.

San Francisco hotels saw improving results despite a boycott against 13 of them. Unite Here Local 2, the union representing hotel workers, is in a dispute with the hotels dating to August 2004, when the last contract expired. As part of the boycott, union members telephone meeting planners and ask them not to give their business to the hotels.

"They have no excuse not to share that wealth with the workers who created it," said Mike Casey, president of Local 2, about the hotel upswing. "Hopefully, saner minds will prevail and realize it's good business to have labor peace."