SYDNEY — Gary the flower-eating goat's graze with Australian police has ended with his comedian owner getting the last laugh in court.

A Sydney judge ruled Wednesday that neither the goat nor his owner could be found guilty of vandalism over an August incident when Gary decided to snack on a flowerbed outside a city museum.

Police at the time leveled a fine of 440 Australian dollars ($465) against owner Jim Dezarnaul, a comedian known as Jimbo Bazoobi.

But man and goat got their day in court, with Gary arriving resplendent in a colorful hat on Wednesday. The brown-and-white goat didn't testify, but he had his own lawyer.

Owner Dezarnaul said the case serves as a lesson to overzealous authorities, "and that's `Don't bite off more than you can chew."

Also on HuffPost:

Loading Slideshow...
  • Spain

    A dog looks over the back of a pew as people take part in a mass at San Anton Church in Madrid, Thursday, Jan. 17, 2013, in honor of Saint Anthony, the patron saint of animals. The feast is celebrated each year in many parts of Spain and people bring their pets to churches to be blessed. (AP Photo/Daniel Ochoa de Olza)

  • Myanmar

    In this photo taken on Wednesday, Jan. 16, 2013, two boatmen cross the Yangon River to a jetty to carry passengers in Yangon, Myanmar. (AP Photo/Khin Maung Win)

  • Japan

    20 years old woman dressed in traditional kimono walks in the rain for her 'Coming-of-Age Day' celebration at Cultural Hall on January 14, 2013 in Himeji, Japan. The event involves 20-year-old Japanese people celebrating their eligibility to drink alcohol, smoke and vote. (Photo by Buddhika Weerasinghe/Getty Images)

  • India

    An Indian Hindu holy man, or Naga Sadhu, walks naked into the water during an evening prayer ceremony known as Arti at Sangam, the confluence of the holy rivers Ganges and Yamuna and mythical Saraswati at the Maha Kumbh Mela in Allahabad, India, Tuesday, Jan. 15, 2013. Millions of Hindu pilgrims are expected to take part in the large religious congregation that lasts more than 50 days on the banks of Sangam during the Maha Kumbh Mela in January 2013, which falls every 12th year. (AP Photo/Kevin Frayer)

  • Belgium

    Sheeps are pictured in a snow-covered field on January 15, 2013 near Brussels. (BENOIT DOPPAGNE/AFP/Getty Images)

  • New York

    Women walk by a graffiti memorial in memory of a woman in the Bedford-Stuyvesant neighborhood on January 17, 2013 in the Brooklyn borough of New York City. Visual memorials honoring residents who in many cases met violent ends decorate many Brooklyn neighborhoods. New York Governor Andrew Cuomo recently signed into law the New York Secure Ammunition and Firearms Enforcement Act, one of the toughest gun laws in the country. (Photo by Spencer Platt/Getty Images)

  • Nepal

    A homeless woman begs as her child sleeps in her arms at the Basantapur Durbar Square in Katmandu, Nepal, Tuesday, Jan. 15, 2013. Basantapur Durbar Square is the plaza in front of the old royal palace and is a place of tourist interest. (AP Photo/Niranjan Shrestha)

  • Iran

    Iranian actress Elaheh Pourjamshid, performs her role as a mother in 'Awakening of The Particles' street theater, telling a story on children's education, during the 31st Fajr International Theater Festival, in central Tehran, Iran, Thursday, Jan. 17, 2013. IIran holds the Fajr festival, the most important theatrical event in the country, along with film, music, and visual arts, marking the anniversary of the 1979 Islamic revolution. (AP Photo/Vahid Salemi)

  • Portugal

    A woman stops to pat "Manchas" or "Spots", a pet pig being walked by its owner Claudia Botas, in the background, in Lisbon's Graca neighborhood, Saturday, Jan. 12, 2013. (AP Photo/Francisco Seco)

  • Britain

    Metropolitan 1, a restored steam train built in 1898, passes a modern tube train through Farringdon Tube station on it's journey between Olympia Tube station in the west to Moorgate station in the City of London, Sunday, Jan. 13, 2013, as part of the celebrations for the 150th anniversary of the London Underground Tube system. The first stretch of the world-famous network opened to the public on Jan. 10, 1863. (AP Photo/Alastair Grant)

  • India

    An Indian Hindu holy man, or Naga Sadhu, swings his head as he bathes at Sangam, the confluence of the rivers Ganges, Yamuna and mythical Saraswati, during the royal bath on Makar Sankranti at the start of the Maha Kumbh Mela in Allahabad, India, Monday, Jan. 14, 2013. Millions of Hindu pilgrims are expected to take part in the large religious congregation that lasts more than 50 days on the banks of Sangam during the Maha Kumbh Mela in January 2013, which falls every 12th year. (AP Photo/Kevin Frayer)