It was the British.
They intercepted the Zimmerman note where they offered to help Mexico
reclaim territories that it lost to the United States if they support Germany
in the war against the Allies. Before
this development, the U.S. tried to keep itself out of the war. But when the
British revealed this info along with the sinking of the Lusitania caused by
unrestricted German warfare in the Atlantic Ocean, America joined the war on
the side of the Allies.