A 47-year-old man was shot during a carjacking Sunday morning in the Uptown neighborhood on the North Side.

The man was inside his white, four-door Hyundai sedan about 10:50 a.m. in the 800 block of West Leland when two males walked up, pulled out a handgun and demanded the car, according to Chicago Police.

After he grabbed for the gun, the man was shot in his thigh, police said. He was taken to Weiss Memorial Hospital before being transferred to Illinois Masonic Medical Center in good condition.

The males, who are thought to be between the ages of 20 and 25, drove off in the Hyundai, police said.

Area North detectives were investigating.