A government can claim jurisdiction over anything worldwide. A different government can disagree.
The two may negotiate over that, in which case common sense ideas like "they didn't do it in your territory" may make one side look foolish, which may in fact have a real influence over the outcome of the negotiations.
If they can't come to an agreement, then it may become a matter of whether the "offender" happens to travel somewhere where they can be grabbed. In the end, jurisdiction is about who has the power to enforce their laws. There's no universally-agreed-upon uber-legal system to make it otherwise.
The two may negotiate over that, in which case common sense ideas like "they didn't do it in your territory" may make one side look foolish, which may in fact have a real influence over the outcome of the negotiations.
If they can't come to an agreement, then it may become a matter of whether the "offender" happens to travel somewhere where they can be grabbed. In the end, jurisdiction is about who has the power to enforce their laws. There's no universally-agreed-upon uber-legal system to make it otherwise.