base in cuba

I have been wondering this forever and now I just have to ask. how did we end up with a military base in cuba? we are keeping war criminals in cuba, I thought we were mortal enemys with cuba, why do we have a base there? and not just some hunkered down fort, a base we use with no complaint to ship people in and out, a high traffic base, not just a marginal fort allowed bitterly to exist by cuba.

how did that happen? anyway?

How did the U.S. get a naval base in Cuba?