updated 06/06/2014 AT 11:35 AM ET
•originally published 06/06/2014 AT 8:30 PM ET
The end had been a long time coming.
Jennifer Lopez and Casper Smart’s relationship simply ran its course a couple of months ago – before Smart’s alleged online flirting with someone else – and they’ve been slowly but amicably separating since then.
“It just came to an end. And they both knew it,” a friend of Lopez tells PEOPLE. “But just because it ended didn’t mean they had to be enemies. She cares for him very much. He’s a good guy. He’s really a very good, stand-up guy. It came to a natural end, and they didn’t want to make any big announcements that they were having problems.”
The split happened about six weeks ago, but the couple have remained in contact. Smart, 27, was at a photo shoot with Lopez, 44, last week and has still been living at her house, though he is expected to move out soon.
“They were having problems for a while, but she wanted to be supportive and was concerned about him,” the pal says. “For him being so young, he’s handling it very adult He’s really sweet and young. And that’s the truth. She’s not a victim. She’s in a great space.”
The pair had been together for two and a half years.
“It’s something they’ve been privately dealing with,” says the source, “and they’re both resolved to move on.”
Reporting by ELIZABETH LEONARD and LIZ McNEIL