Microsoft and Google have agreed to end a five-year battle over patents.Eighteen lawsuits had been active between the companies, relating to uses of technologies in mobile phones, WiFi and other areas.It is the latest move by technology firms to keep patent rows out of the courts.The battles, particularly over software, intensified in recent years as firms sought to capitalise on their patent portfolios. The two firms had been involved in a tangled web of disputes, some spurred by Google’s acquisition of Motorola Mobility in 2011, which meant the search giant took on board a large number of patents relating to mobile phone and network technology.Google bought Motorola’s mobile arm for $12.5bn (£8.3bn) in 2011, only to sell it in 2014 for $2.91bn to Lenovo. Google retained the bulk of the patents it took on in the original deal.