But the thousands of golf enthusiasts here for the 150th British Open are finding that St. Andrews, population 18,000, is a small town after all.

With 260,000 to 280,000 visitors descending on the town, the three main streets and surrounding estates are struggling to accommodate everyone. As hotels, and bed and breakfasts, declare no vacancies, the remaining options fall to vacation apartment rentals from real estate agencies, Web sites and homemade signs in windows.

Every year, 6,000 to 8,000 students clear out after classes end in May and vacationers arrive to fill the seaside town's accommodations. With an increasing number of visitors, local residents reap the added seasonal revenue. But the years when the Open is played here are the most lucrative.

Yvonne Moffat, the owner of Six Murray Park, a bed and breakfast near the Old Course, said bookings were filled for this year's Open only days after the 2009 Open in Turnberry. Like many bed and breakfasts in the area, she imposed a minimum seven-day stay, with an overall price of £1,200, or about $1,800, for bed, breakfast and a light dinner. The usual rate is £70, about $100, for one night in a double room.

On North Street, one of the three main streets, a boutique hotel is among the many establishments that more than doubled its rates during the Open. For seven days, including breakfast, the rate ranged from £2,500 to £3,000, or about $3,800 to $4,600.

For many hotels, the added revenue during the Open makes up for the three weeks before it starts, when the golf courses are closed to the public for maintenance and preparation. During that time, revenue can drop 20 percent to 30 percent, owners say.

Those hoping to find a cheaper option by renting private apartments rather than a hotel room were out of luck, though.

Pagan Osbourne, the official rental agency to the Open in St. Andrews for 25 years, estimated that the average price for a property rented during the week of the Open was £4,500, about $6,800. The highest price for a one-week rental stood at £20,000, about $30,500.

"We market the properties at rates we know are in line with market conditions," said Matthew Gray, the property sales director at Pagan Osborne.

Although the prices remained high by British standards, foreign visitors were buoyed by a weakening British pound.

During last year's Open in Turnberry, a pound was worth $1.65. This year, it has fallen to about $1.50, a drop of about 10 percent. For a £2,000 accommodation bill, that means an American golf tourist can save about $300 compared with last year.

But after paying for air fare, a car rental and tickets to the event, "What's a few more dollars for lodging?" said Lex Page, a golf enthusiast from Oregon who attended the last Open at St. Andrews, in 2005.

The demand for accommodation during the Open means that bills often reach four or five figures, although that price does not always mean five-star accommodations. Luxury, comfort and style are not guaranteed, as many of the golf rentals are the same apartments in which students of the University of St. Andrews stay. Houses with dated kitchens and party-stained carpets can still be expensive.

What counts to many tourists is the proximity to the golf courses. One two-bedroom apartment that is a five-minute walk from the courses was rented for £1,700, about $2,600, for the duration of the Open, about double what it would cost students the rest of the year.

"The bargain pricing of the house is due to the fact that for most of the year, it is let out to university students and as a result is not furnished to luxury standards," said one advertisement for housing on standrewsopen.com.

Some tourists booked accommodation in university residence halls in the town center. At £700, about $1,070, for the Open, it is one of the cheapest options, but the ratio of bathrooms to bedrooms in some halls is about 1 to 6.

In a town where the average home price is 8.63 times the average salary and houses sell on average for £431,585, about $660,000 — compared with the national average of £147,854, about $226,000 — many homeowners are happy to rent their property for one week during the Open. One local resident said she would be able to rent her home, take a vacation during the week and come back having made a profit.