WASHINGTON — The Justice Department said Wednesday that it had ended an investigation into possible coordination among AT&T, Verizon and a standards-setting organization to make it more difficult for people to switch wireless carriers. The agency said the groups had agreed to change their practices, reducing competition concerns.

In its investigation, which began two years ago, the Justice Department looked into whether the two companies and a trade association, known as G.S.M.A., that sets mobile technical standards had worked together to hinder a technology called eSIM. The technology lets people remotely switch wireless providers without having to insert a new SIM card into a device.

The Justice Department dropped its investigation after the parties agreed to change how they determine standards for eSIM, the agency’s head of antitrust, Makan Delrahim, said in a letter to the trade group. The change will allow consumers to use the technology to switch carriers, the agency said.

“We applaud G.S.M.A.’s efforts to ensure that its new process provides for an adequate balance of interests,” Mr. Delrahim wrote.