SOUTHWEST MIAMI-DADE, Fla. -

A Miami-Dade undercover narcotics detective was shot several times in the stomach Tuesday evening at around 6:30 p.m. while he and other officers were involved in an investigation at a home along Coral Way.

The shooting happened in the area of Coral Way and Southwest 57th Avenue about 6:45 p.m. on Tuesday. Police said the detective received a tip about a transaction happening at the house where the shooting occurred.

The narcotics unit arrived at the house near SW 24 street and 62nd avenue, after receiving a tip. Detectives were talking to man when another man, sitting in a car parked at the house, began shooting. The detective was hit. In turn, other detectives started shooting. One of the bullets hit the suspect, and the other suspect was taken into custody by police officers.

VIDEO: Detective arrives at Jackson Memorial Hospital

Meanwhile the wounded detective was rushed to Jackson Memorial Hospital where he underwent surgery and is expected to recover.

Miami-Dade Police Director James Loftus, who spoke exclusively with Local 10, said the officer was conscious and is expected to survive. He was taken into emergency surgery and released in stable condition a few hours later.

Miami-Dade Detective Roy Rutland said the detective was alert and talking with family members and officers before going into surgery. Rutland said he was shot multiple times in the stomach. Police said the detective's wife was at the hospital with their family.

A large perimeter was established in the area that covered about six blocks as police investigated. All the while, many residents were not allowed in or out of their homes.

"It's kinda scary… Especially kinda close to where you live. It's very scary,” Gloria, a neighbor, told Local 10.