American actor Andy Griffith, best known as the folksy Sheriff of Mayberry, died Tuesday at his home in Dare County, North Carolina. He was 86 years old.

The legendary actor, director and gospel singer was best known for his television roles as lead character Andy Taylor on “The Andy Griffith Show” and the kind but shrewd criminal defence lawyer "Matlock.”

Griffith's death was confirmed by Dare County Sheriff Doug Doughtie.

"Mr. Griffith passed away this morning at his home peacefully and has been laid to rest on his beloved Roanoke Island," Doughtie told The Associated Press, reading from a family statement.

Earlier, a local television station reported Griffith’s death and cited close friend Bill Friday, a former president of the University of North Carolina.

Griffith was born on June 1, 1926 in Mount Airy, N.C. and went on to earn a music degree from the University of North Carolina in 1949.

He considered becoming a minister before taking a job teaching high school music in Goldsboro, N.C.

A singer and comedian before turning to acting, Griffith showcased his musical talents on both the Ed Sullivan Show and the Steve Allen Show before moving to Broadway in the mid-1950s to perform in “No Time for Sergeants,” for which he garnered a Tony nomination, and later “Destry Rides Again.”

Griffith made his movie debut in 1957’s “A Face in the Crowd.”

But it was his career-defining role as Andy Taylor in “The Andy Griffith Show,” that made him a true household name. In the show, which ran for eight seasons, Griffith played widowed Sheriff Andy Taylor in the fictional town of Mayberry, which was based on Griffith’s own hometown of Mount Airy.

As Sheriff he rarely had big crimes to solve, spending most of his time dispensing folksy wisdom to his son, Opie, played by Ron Howard, and his deputy, Barney Fife, played by Don Knotts.

The show ran for eight seasons, launched actor and director Howard’s career and led to a lifelong friendship between Griffith and Knotts that only ended with Knotts’ death in 2006.

Knotts’ widow, Francey Yarborough Knotts, said she spoke with Griffith on his birthday and he had seemed in good spirits.

"Don and I loved Andy very much," she said. "Andy and Don had a great friendship and a great creative partnership. Throughout their lives, they continued to have fun together and discuss the art of comedy and acting."

Knotts won five supporting-actor Emmys for his role as Deputy Fife.

Griffith acknowledged that fans of “The Andy Griffith Show” would expect him to be just like their favourite Sheriff in real life. But he told The Associated Press in a 2007 interview that he was neither as wise as Taylor, nor as nice.

He said he could be as cranky as his diner-owner character in “Waitress,” or manipulative, like his character in “A Face in the Crowd,” his 1957 film debut.

"But I guess you could say I created Andy Taylor," he said. "Andy Taylor's the best part of my mind. The best part of me."

Howard issued a statement upon learning of Griffith’s death.

“His love of creating, the joy he took in it whether it was drama or comedy or his music, was inspiring to grow up around," Howard said. "The spirit he created on the set of 'The Andy Griffith Show' was joyful and professional all at once. It was an amazing environment.”

Griffith’s other big television success was “Matlock,” the vehicle that made both his folksy charm and seersucker suits stylish once again. For nine seasons, Griffith played a kindly but shrewd criminal defence lawyer in a show that gained popularity among both older and younger viewers.

Griffith won the People’s Choice Award for the show in 1987.

Griffith returned to his musical roots with the album “I Love to Tell the Story: 25 Timeless Hymns,” which won a Grammy Award in 1997. In 2007, he was inducted into the Christian Music Hall of Fame and Museum.

Griffithwas inducted into the Academy of Television Arts Hall of Fame in 1992, and in 2005, he was awarded the Presidential Medal of Freedom.

Griffith suffered health problems off-an-on beginning in the 1980s, when he was diagnosed with Guillain-Barre syndrome, a neurological disorder that can lead to sudden paralysis.

In 2000, he underwent successful quadruple bypass surgery, and had a hip operation after a fall in 2007.

Griffith was married three times, most recently to Cindi Knight. Griffith adopted two children, Andy Jr. and Dixie, with his first wife, Barbara Griffith. His son died in 1996.

With files from The Associated Press