Let X be a graph withONLYone spanning tree. Prove that X is a tree.

What I proved so far is that X is connected since all graphs with a spanning tree should be connected. All I need to do now is to prove that it's acyclic or has n-1 edges.

Any leads?