I'm pretty sure this is the ending from a film, but there is a chance it may be a TV series instead, hence the extra tag.
This is a film seen recently, set in modern day America.
All I can remember from the film is that the ending scene is on a building's roof. The bad guy has two friends (possibly relations, possibly wife and mistress) of the hero held at gunpoint and he asks the hero which of the two he should kill, otherwise both will die. The hero struggles with the decision, the bad guy gets more and more agitated. The hero eventually chooses someone, and at that point the unchosen person strikes the bad guy with a pipe, or bat or some other physical weapon they were holding. The bad guy then gets killed. I seem to remember that the hero was in pretty bad shape by this point in the film and think they fell to the floor afterwards.
I thought for a while that it was the film Twelve Rounds, but re-reading the IMDB description it doesn't mention this ending. It does end on the roof of a building though, so maybe it really is that film I'm thinking of.