Newbury Racecourse has agreed to sell land to the developer David Wilson Homes, which will see almost 1,500 homes built around the course over the next 10 years, including some overlooking the home straight.
The £42.6m deal, which has taken five years and several planning inquiries, came after a hostile takeover bid for the racecourse in 2008 by Australian raider Guinness Peat.
Newbury said it expects to receive £33m after tax from the deal, with a £5.1m upfront payment. The prices are expected to start at £150,000 for a one-bedroom flat, running to £500,000 for a penthouse. The racecourse also has a profit share depending on the success of the development.
Dominic Burke, Newbury's chairman, said: "This will ensure the success of the racecourse as a profitable year-round racing, entertainment and events business with racing at its core."
Newbury said it would pump some £12m into upgrading the racecourse.