Prime Minister Keir Starmer and Chancellor Friedrich Merz have signed a deal on defence and migration.
The leaders say the two nations look to "work ever more closely" on issues such as trade and security.
After signing the document at the V&A Museum in London, the Prime Minister said it would be known as the Kensington Treaty.
He said: "It's a privilege to have you here today, particularly to sign this Kensington Treaty, which is a very special treaty, because it's the first of its kind ever, if you can believe it, between our two countries."
Sir Keir described it as "evidence of the closeness of our relationship as it stands today" as well as a "statement of intent, a statement of our ambition to work ever more closely together".
The agreement was also signed by Foreign Secretary David Lammy and his German counterpart Johann Wadephul.
Mr Merz also delivered remarks after the signing of the treaty. According to a translation of what the German chancellor said, delivered in the signing room, the treaty has reached an agreement on school exchange visits.
A deal with Germany on changing the law to crack down on small boats is "a significant step", Downing Street has said.
Asked if Sir Keir Starmer was frustrated by the slow pace of change in Germany, the Prime Minister's official spokesman said: "We've always been clear that this is an international issue that requires international solutions.
"And over the last year, you've seen the Prime Minister working tirelessly to reset relationships across Europe, and you've seen a number of examples of the progress of that, not least with the French last week.
"This is a significant step that will give law enforcement and prosecutors the tools they need to address this scandal of small boats which are destined to cross the Channel being stored and concealed in Germany.
"And it will ensure that those who feed this illegal trade have nowhere to hide.
You may also like
INDIA bloc leaders to meet virtually on July 19: Political situation on agenda; opposition coordination set to continue
'Dalit youth kidnapped after being stripped naked': Ashok Gehlot
Shooting of director Niranjan's 'Mr. Bhaarath' wrapped up!
Minehead bus crash LIVE: School kids left trapped as 'bus leaves road'
MasterChef's future revealed following John Torode and Gregg Wallace's double axe