In the first incident in Livingston, West Lothian, a 21-year-old woman was attacked in Scott Brae early on Tuesday April 8, then almost a month later a 27-year-old woman was assaulted in Orchard Place in the early hours of Wednesday May 7.
Police made a number of appeals in the wake of the attacks and a 26-year-old man was arrested and charged over them yesterday.
He is due to appear at Livingston Sheriff Court tomorrow.
Detective Chief Inspector Phil Gachagan said: "Incidents like these are very rare but have a serious impact on the fear of crime in the community. We were very aware of the tension and worry these crimes caused in the Livingston area.
"Our dedicated inquiry team carried out a thorough investigation involving a large number of individual inquires which has resulted in the arrest.
"I'd like to thank the public for their patience and support while we carried out inquiries, particularly those who contacted police and came forward with information that assisted the investigation."