Mechanic and Rental Car Issues

I rented a car while a local garage repaired my car. When I went to the garage to to pick my car up and pay for it, I still had the rental. The mechanic told me that an agent from the rental car company called and told him not to give my my car until I paid the rental car company first. The two companies are not affiliated with each other. If I am paying the garage for their services, can they hold my car until I pay the rental car company too? My business with the mechanic and the rental car company is separate and it doesn't seem legal for them to hold my vehicle for reasons that don't involve their company.
 
Top