Visibly moved, the couple exchanged their vows inside Our Lady's Church in downtown Copenhagen.
As the couple left the church, Frederik kissed his wife on the lips, the first time they have done so in public. Outside, a roar of approval erupted from the tens of thousands who lined the streets to watch the ceremony on dozens of outdoor video screens.
Across all of Denmark, Europe's oldest monarchy, thousands more watched the spectacle on live television and heard it on national radio.
When the couple left the church, the crowds erupted in applause and waved Australian and Danish flags. The couple, beaming, waved back before passing through a navy honor guard.
Overhead, the gray clouds that had gathered all day broke apart letting the sun's rays peek through.
During the lavish ceremony, Lutheran Bishop Erik Norman Svendsen asked the couple if they would love and honor each other and live with each other in prosperity and adversity.
Frederik said "yes" in a clear voice followed by Mary, who said the same. The couple affirmed their vows twice, a Danish Lutheran wedding tradition.
"Since you have promised one another that you will live together in marriage and have now confirmed before God, and before us who are present, I declare you to be man and wife before God and all of mankind," Norman Svendsen said.
Just beyond the neoclassical cathedral, armed police with sniffer dogs moved through the throngs of people gathered to watch the guests leave the cathedral.
"It's just so great to be here for the day, it's just fantastic," said Chloe Baldwin of Australia.
Overhead, helicopters monitored the skies while officers checked persons carrying large bags. Some 1,300 uniformed police officers watched over the two-mile parade route, and army ambulances were parked in adjacent streets.
The couple used an open-topped carriage to ride through downtown Copenhagen. In the carriage, Mary gave Frederik a kiss on the cheek, prompting more applause from the crowd.
Tens of thousands of people jammed the streets of city to get a glimpse of the newlyweds' carriage. In recent days, at least 50,000 Danish and Australian flags were handed out by tourist officials.
Others had lined up to catch a glimpse of some of the royal dignitaries, including Swedish King Carl XVI Gustaf and Queen Silvia, Japanese Crown Prince Naruhito, and Spanish Crown Prince Felipe, as they boarded royal yacht Dannebrog for the pre-wedding brunch.
Downtown was closed to cars - except for the fleet of nearly 100 Volvo limousines and dark buses carrying guests to the Fredensborg Palace for an evening party.
With memories of the deadly terrorist bombings in Madrid still fresh, the Danish capital of 1.8 million people is taking no chances. One-third of Denmark's 10,000-strong police force was on security duty while the air space over Copenhagen was closed and security boats patrolled the harbor.
Plainclothes bodyguards protected foreign guests, Princess Chulhaborn of Thailand; members of every royal house in Europe; and Farah Pahlavi, the widow of the Shah of Iran.
Other guests included Britain's Prince Edward and his wife, Sophie; Australian Governor General Michael Jeffrey and Tasmanian Governor Richard Butler; and France's first lady, Bernadette Chirac.
Denmark has been celebrating the wedding for more than a week with a military parade, a banquet for Danish dignitaries on Tuesday and receptions at Copenhagen's City Hall and at Parliament. Festivities also included more casual events, such as a boat race, a rock concert, a private party in a hip nightclub and hundreds of children dressed as princes and princesses cheering the couple.
A keen yachtsman, horseman and marathon-runner, Frederik met Donaldson during the 2000 Olympics in Sydney when he and Felipe stopped in at the Slip Inn bar.
The first year of their relationship was kept secret, Donaldson, a 32-year-old law graduate, later said.
After 14 months of secret visits by Frederik to Australia, scores of telephone calls, e-mails and love letters, the couple agreed near the end of 2001 that she should move to Paris so the two could be closer. In early 2003, Donaldson moved to Copenhagen.
After months of speculations, the palace finally confirmed the romance, and on Oct. 8 they were engaged.
(c)MMIV, The Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten, or redistributed