Narrative:

Shortly after takeoff; master caution warning went off along with the main door handle light. After the first officer leveled the aircraft at 5000 ft; I ran the checklist. Pursuant to the checklist; I called the flight attendant and asked her to look at the door handle position indication. She informed me that the indicators were slightly out of position. The QRH required the flight attendant to move passenger away from the door. She complied. The QRH also required a landing at the nearest suitable airport. I asked ATC to return us to ZZZ (nearest suitable). I also declared an emergency. After landing the aircraft; I determined that there was no longer a need for the emergency; therefore; I canceled the emergency and taxied to the assigned gate. I met maintenance at the gate. The mechanic determined that the door handle was improperly closed. The problem was resolved and we continued the flight.

Google
 

Original NASA ASRS Text

Title: SF340 FLT CREW REPORTS CABIN DOOR WARNING AT ROTATION AND AFTER COMPLYING WITH QRH; LANDS SAFELY AT DEPARTURE ARPT.

Narrative: SHORTLY AFTER TKOF; MASTER CAUTION WARNING WENT OFF ALONG WITH THE MAIN DOOR HANDLE LIGHT. AFTER THE FO LEVELED THE ACFT AT 5000 FT; I RAN THE CHKLIST. PURSUANT TO THE CHKLIST; I CALLED THE FLT ATTENDANT AND ASKED HER TO LOOK AT THE DOOR HANDLE POS INDICATION. SHE INFORMED ME THAT THE INDICATORS WERE SLIGHTLY OUT OF POS. THE QRH REQUIRED THE FLT ATTENDANT TO MOVE PAX AWAY FROM THE DOOR. SHE COMPLIED. THE QRH ALSO REQUIRED A LNDG AT THE NEAREST SUITABLE ARPT. I ASKED ATC TO RETURN US TO ZZZ (NEAREST SUITABLE). I ALSO DECLARED AN EMER. AFTER LNDG THE ACFT; I DETERMINED THAT THERE WAS NO LONGER A NEED FOR THE EMER; THEREFORE; I CANCELED THE EMER AND TAXIED TO THE ASSIGNED GATE. I MET MAINT AT THE GATE. THE MECH DETERMINED THAT THE DOOR HANDLE WAS IMPROPERLY CLOSED. THE PROB WAS RESOLVED AND WE CONTINUED THE FLT.

Data retrieved from NASA's ASRS site as of May 2009 and automatically converted to unabbreviated mixed upper/lowercase text. This report is for informational purposes with no guarantee of accuracy. See NASA's ASRS site for official report.