NEW YORK -- An American Eagle flight from Detroit has landed safely at New York's LaGuardia Airport after being struck by lightning.

American Airlines spokesman Matt Miller says American Eagle Flight 4563 was struck twice by lightning as it approached New York on Wednesday morning.

Miller says the captain declared an emergency as a precaution. The plane landed safely at 10:41 a.m.

The spokesman says a maintenance team is inspecting the aircraft. It was an Embraer 135 with 20 passengers and three crew members.

Related on HuffPost:

Loading Slideshow...
  • Rain clouds sweep over the desert plains on the Birdsville Track June 9, 2005 near Marree, Australia. (Photo by Ian Waldie/Getty Images)

  • A storm cloud passes over as the US space shuttle Discovery sits on Pad 39A on November 3, 2010 at Kennedy Space Center in Florida. (TIMOTHY A. CLARY/AFP/Getty Images)

  • A girl gathers flowers of rapeseed (brassica napus) in a field some 300 km from Kiev prior to heavy rain on May 10, 2010. (SERGEI SUPINSKY/AFP/Getty Images)

  • Rain clouds sweep over the desert plains on the Birdsville Track June 9, 2005 near Marree, Australia. (Photo by Ian Waldie/Getty Images)

  • Clouds hang over the Hong Kong skyline on May 22, 2011. (Ed Jones/AFP/Getty Images)

  • The cathedral of Strasbourg, eastern France is pictured on September 18, 2011 as the sun sets on a cloudy sky. (PATRICK HERTZOG/AFP/Getty Images)

  • Simon Buret, the singer of French band Aaron, performs during the second day of the 36th edition of the Paleo festival on July 20, 2011 in Nyon. (FABRICE COFFRINI/AFP/Getty Images)

  • A cumulonimbus cloud as seen from a commercial airliner on May 28, 2009. (KAREN BLEIER/AFP/Getty Images)

  • Rainclouds cover the buildings in the central business district of Bangkok on June 16, 2008. (PORNCHAI KITTIWONGSAKUL/AFP/Getty Images)

  • Huge rainclouds gather on the horizon beyond Belarabon Station May 17, 2007 in Cobar, Australia. (Photo by Getty Images)

  • Rain clouds loom over the city skyline November 23, 2005 in Sydney, Australia. (Photo by John Pryke/Getty Images)

  • Villagers walk against a backdrop of cyclone clouds on the outskirts of the eastern temple city Bhubaneswar on May 25, 2009. (ASIT KUMAR/AFP/Getty Images)

  • Dark rainclouds loom before a heavy downpour, which delayed the start of the IPL Twenty20 cricket match between Pune Warriors India and Royal Challengers Bangalore at The Subroto Roy Sahara Stadium in Pune on May 11, 2012. (INDRANIL MUKHERJEE/AFP/GettyImages)

  • Indian walk along Juhu Beach in Mumbai on July 22, 2008 as monsoon rainclouds gather overhead. (SAJJAD HUSSAIN/AFP/Getty Images)

  • Storm Clouds gather during day 3 of the Fifth Test between South Africa and England on January 23 2005 at Centurion Cricket Ground, Pretoria, South Africa (Photo by Tom Shaw/Getty Images)

  • Also On The Huffington Post...

    Research is finding that there may be a link between lightning and migraines. The reason could be changes to the air's ionic charges from a lightning strike affecting a person's brain, giving them a migraine. But the scientists admit more research needs to be done. Patrick Jones has the story.