STRASBOURG, March 13 (Reuters) - EU lawmakers on Wednesday endorsed a provisional agreement on artificial intelligence(AI) rules, the world's first legislation to set guardrails on a technology used in banking, internet-connected devices, smart homes and cars.

The European Parliament and EU countries had clinched a preliminary deal in December after nearly 40 hours of negotiations on thorny issues such as governments' use of biometric surveillance and how to regulate foundation models of generative AI such as ChatGPT. (Reporting by Foo Yun Chee; Editing by Kevin Liffey)