The trip was a brief detour on Westerwelle's planned trip to Israel. Stopping in Malta on Monday morning, the foreign minister changed planes and headed to a military base outside Benghazi, where the Libyan opposition leadership, the National Transitional Council, is based.
During the symbolically-charged visit, Westerwelle opened the German liaison office, where two German diplomats have been working to strengthen ties with the Libyan rebels.
Germany now recognized the rebel council as the Berlin's partner for dealings in Libya, Westerwelle said.
"The NTC is the legitimate representative of the Libyan people," Westerwelle told reporters after meeting council officials, including the rebel "foreign minister" Ali al-Essawi.
"We want a free Libya, in peace and democracy without (Muammar) Qaddafi," he said in the rebels' eastern bastion of Benghazi, Libya's second city.
Germany becomes the 13th nation to recognize the NTC as "sole legitimate representative," after Australia, Britain, France, Gambia, Italy, Jordan,
Malta, Qatar, Senegal, Spain, the United Arab Emirates and the United States.
"We welcome Germany's recognition, which will definitely boost international support for the Libyan revolt," NTC chairman Mustafa Mohamed Abdel Jalil told a joint news conference with Jordanian Foreign Minister Nasser Judeh in Amman.
Development Minister Dirk Niebel accompanied Westerwelle on the three-hour visit, which is the first by any member of the German government to the rebel-controlled area.
Westerwelle's visit is meant to signal that Germany is committed to supporting a new, post-Qaddafi Libya, despite its abstention from a United Nations vote on military intervention in the country.
Westerwelle's plane also carried humanitarian aid for the people of Benghazi.