Google Inc., avoiding a potentially costly legal battle with U.S. regulators, ended a 20-month antitrust probe by pledging to change some business practices and settling allegations it misused patents to thwart competitors in smartphone technology.

The Federal Trade Commission voted 5-0 to close its investigation into whether Google unfairly skewed its search results, with the company saying it would voluntarily remove restrictions on the use of its online search advertising platform, and offer companies the option to keep their content out of Google’s search results.