Exhibit 10.31

THIRD AMENDING AGREEMENT

THIS AGREEMENTis made as of December 7, 2004,

B E T W E E N:

MAGNA ENTERTAINMENT CORP.

as Borrower (the "Borrower")

- and -

THE GUARANTORS SET FORTH
ON THE SIGNATURE PAGES HEREOF
as Guarantors (collectively, the "Guarantors")

- and -

BANK OF MONTREAL, ACTING THROUGH ITS
CHICAGO LENDING OFFICE
as Lender (the "Lender")

- and -

BANK OF MONTREAL, ACTING THROUGH ITS
CHICAGO LENDING OFFICE
as Agent (the "Agent")

RECITALS:

---



NOW THEREFOREin consideration of the mutual covenants and agreements herein contained and other good and valuable
consideration (the receipt and sufficiency of which are hereby acknowledged) the parties agree as follows:

Capitalized
terms not defined in this Third Amending Agreement have the meaning given to such terms in the Loan Agreement.







2

---



Each of the Guarantors (other than Gulfstream Park Racing Association, Inc.) acknowledges and confirms that (i) the guarantee
granted
by it pursuant to Article 10 of the Loan Agreement constitutes a continuing guarantee of, among other things, all present and future obligations of the Borrower to the Lender under the Loan
Agreement and shall remain in full force and effect; and (ii) each of the other Loan Documents executed by it shall remain in full force and effect. In addition, (i) MEC Land Holdings
(California) Inc. acknowledges and confirms that the Golden Gate Mortgage constitutes continuing security for the obligations secured thereby and shall remain in full force and effect, and
(ii) The Santa Anita Companies, Inc. acknowledges and confirms that the Santa Anita Mortgage constitutes continuing security for the obligations secured thereby and shall remain in full
force and effect.

The Borrower represents and warrants to the Agent and the Lender that all of the representations and warranties of the Borrower set out in
section 6.1 of the Loan Agreement are true and correct on the date hereof provided if any such representation and warranty is specifically given as of any particular date or particular period
of time, then such representation and warranty shall continue to be given as at such date or such period of time.

This Third Amending Agreement may be signed in any number of counterparts, each of which shall be deemed to be an original, but all such
counterparts shall together constitute one and the same instrument.

3

---



IN WITNESS WHEREOFthis Third Amending Agreement has been executed by the parties hereto as of the date first written
above.

| |  | MAGNA ENTERTAINMENT CORP., as Borrower
| |  | --------------------------------------
| |  |                                       
| |  |                                       
| |  | By:                                   
| |  | By:                                   

|
|

| |  | BAY MEADOWS OPERATING COMPANY LLC, as Guarantor, but only with respect to Article 10 of the Loan Agreement and all other provisions related thereto
| |  | ---------------------------------------------------------------------------------------------------------------------------------------------------
| |  |                                                                                                                                                    
| |  |                                                                                                                                                    
| |  | By:                                                                                                                                                
| |  | By:                                                                                                                                                

4

---



| |  | GULFSTREAM PARK RACING ASSOCIATION, INC., as Excluded Subsidiary
| |  | ----------------------------------------------------------------
| |  |                                                                 
| |  |                                                                 
| |  | By:                                                             
| |  | By:                                                             

|
|

| |  | PACIFIC RACING ASSOCIATION, as Guarantor, but only with respect to Article 10 of the Loan Agreement and all other provisions related thereto
| |  | --------------------------------------------------------------------------------------------------------------------------------------------
| |  |                                                                                                                                             
| |  |                                                                                                                                             
| |  | By:                                                                                                                                         
| |  | By:                                                                                                                                         

5

---



| |  | MEC LAND HOLDINGS (CALIFORNIA) INC., as Guarantor, but only with respect to Article 10 of the Loan Agreement and all other provisions related thereto
| |  | -----------------------------------------------------------------------------------------------------------------------------------------------------
| |  |                                                                                                                                                      
| |  |                                                                                                                                                      
| |  | By:                                                                                                                                                  
| |  | By:                                                                                                                                                  

|
|

| |  | THE SANTA ANITA COMPANIES, INC., as Guarantor, but only with respect to Article 10 of the Loan Agreement and all other provisions related thereto
| |  | -------------------------------------------------------------------------------------------------------------------------------------------------
| |  |                                                                                                                                                  
| |  |                                                                                                                                                  
| |  | By:                                                                                                                                              
| |  | By:                                                                                                                                              

6

---



| |  | LOS ANGELES TURF CLUB, INCORPORATED, as Guarantor, but only with respect to Article 10 of the Loan Agreement and all other provisions related thereto
| |  | -----------------------------------------------------------------------------------------------------------------------------------------------------
| |  |                                                                                                                                                      
| |  |                                                                                                                                                      
| |  | By:                                                                                                                                                  
| |  | By:                                                                                                                                                  

|
|

| |  | BANK OF MONTREAL, acting through its Chicago lending office, as Lender
| |  | ----------------------------------------------------------------------
| |  |                                                                       
| |  |                                                                       
| |  | By:                                                                   
| |  | By:                                                                   

7

---



| |  | BANK OF MONTREAL, acting through its Chicago lending office, as Agent
| |  | ---------------------------------------------------------------------
| |  |                                                                      
| |  |                                                                      
| |  | By:                                                                  
| |  | By:                                                                  

8

---