Washington (CNN) -- Australian Prime Minister Julia Gillard pledged true friendship with the United States on Wednesday and encouraged the nation that inspired her youth by landing on the moon to be bold in shaping the 21st century.
In a speech to a joint meeting of Congress, Gillard backed the U.S. policy in Afghanistan but warned against failing to fully complete it, and called for a brave and innovative U.S. approach to economic reforms in the wake of the global recession.
Her voice appeared to catch as she told how watching the moon landing in 1969 made her believe Americans could do anything.
"I firmly believe you are the same nation that amazed me," Gillard said, adding: "I believe that still, you can do anything."
The address was part of a Washington visit this week that included a trip to an area school with President Barack Obama to emphasize the importance of education, as well as an appearance at a State Department event Tuesday on International Women's Day.
It was Gillard's first Washington visit since she won election last year as Australia's first female prime minister.
Gillard made clear that the shared democratic values of Australia and the United States stand above any possible policy differences.
"Distinguished members of the Senate and the House, you have a true friend down under," she said to a standing ovation, calling her nation "an ally in war and peace, an ally in hardship and prosperity" and adding that "Australia is also an ally for all of the years to come."
Sounding like Obama at times, Gillard endorsed working together to bring a "high technology, high skills, clean energy economy" for the 21st century, with an emphasis on the "transformative power" of education.
She also praised the United States and the G-20 nations for providing economic stimulus in the face of the global recession, calling it "crucial to limit the worst effects of the downturn."
Now the need is for economic reform, Gillard said, urging Congress to pass a 2012 farm bill "that advances free trade instead of distorting it" -- an apparent reference to large agricultural subsidies.
On Afghanistan, Gillard said the U.S.-led international force -- which includes Australian troops -- has the right strategy and a "resolute and courageous commander" in U.S. Gen. David Petraeus, as well as the resources to carry it through.
Calling herself cautiously optimistic, she warned that hard times lay ahead in Afghanistan and "we know transition will take some years," adding: "We must not transition out only to transition back in. We must not."