The first man was identified as Khuram Shazad Butt, aged 27, born in Pakistan. The police said Butt was known to the police and MI5, but there was no evidence to suggest this attack was being planned.
The second attacked was Rachid Redouane, 30, the police said, who claimed to be of Moroccan and Libyan descent.
"He also used the name Rachid Elkhdar, with a different date of birth of 31.7.91," the statement issued by the police said.
Updates: Two men shot dead by police following terrorist attack in #LondonBridge #BoroughMarket named https://t.co/prQUaxy2k4 pic.twitter.com/LR4klVhZ64
— Metropolitan Police (@metpoliceuk) June 5, 2017
Both Butt and Redouane were from Barking, east London.
The identity of the third accomplice is yet to be established.
On Saturday night, a vehicle drove into pedestrians on London bridge, with its three occupants then leaving the car and attacking several people with knives. At least seven people have died, 48 injured. Police killed the three attackers on the scene and later took 12 people into custody in connection with the attacks.