FILE PHOTO: A BMW logo is seen on a wheel at the Brussels International Auto Show in Belgium, January 22, 2015. REUTERS/Yves Herman/File Photo

WASHINGTON (Reuters) - German automaker BMW AG BMWG.DE has agreed to pay up to $477.7 million to settle a class-action lawsuit covering about 318,000 U.S. luxury car owners who may have suffered water damage harming electrical components in vehicle trunks.

According to settlement documents filed in U.S. District Court in New York last week, the settlement covers owners of 2004-2010 model year BMW 5 Series cars and will allow owners to receive up to a $1,500 reimbursement for prior repairs.

A BMW spokeswoman did not immediately comment on Tuesday.

Owners of vehicles with fewer than 120,000 miles (193,121 km) and are less than 10 years old are eligible for a free inspection and repairs if needed.

The settlement says sensitive electronic components located in the spare tire well of the trunk in some vehicles were damaged by either clogged sunroof drainage tubes or by some

other means of water entering. As part of repairs, dealers will affix a warning label that informs owners not to spill liquids in the trunk.

Owners contend that the automaker knew of the problem as early as 2004 based on complaints, warranty claims and technical service bulletins filed with the U.S. National Highway Traffic Safety Administration. BMW has denied wrongdoing.

BMW has faced suits in New York and California over the issue for four years and the documents do not indicate how many owners may seek reimbursement.

BMW has also agreed to pay nearly $1.8 million to cover legal fees and costs of the suing owners. The settlement must still be approved by U.S. District Judge Katherine Forrest.