Brooklyn rapper Bobby Shmurda was one of a dozen people arrested Wednesday in a two-year weapons and narcotics investigation. View Full Caption Facebook/officialbobbyshmurda

MANHATTAN — Up-and-coming Brooklyn rappers Bobby Shmurda and Rowdy Rebel were arrested early Wednesday morning in Midtown along with about a dozen other people as part of a two-year probe into gang shootings and narcotics, according to officials and sources.

Shmurda, 20, whose real name is Ackquille Pollard, was picked up about 2 a.m. after leaving a Midtown recording studio with members of his East Flatbush GS9 crew, according to sources and a spokeswoman for the Special Narcotics Prosecutor’s Office.

Rebel, whose name is Chad Marshall, was arrested in the recording studio.

The two are linked to a more than a dozen shootings and crack cocaine sales, as well as a possible homicide, in Brooklyn where their East Flatbush crew is based. About 20 weapons were recovered during the investigation led by the NYPD Brooklyn South Violence Reduction Task Force, sources said.

Information on specific charges against Shmurda and others arrested will be unsealed Thursday after they are arraigned in Manhattan Supreme Court, the spokeswoman added.

The joint NYPD-Narcotics Office two-year investigation focused on narcotics and shootings.

Shmurda was also arrested on June 3 on felony weapons charges, according to court records.

He was released on $10,000 bail in that arrest.

Shmurda and Rebel became viral sensations over the summer for a video featuring Shmurda's "Shmoney Dance" that has been viewed more than 30 million times.