With 65 percent of the precincts reporting, Clinton was leading with 52.2 percent of the vote to Sanders' 47.8 percent. Television networks Fox News and MSNBC projected Clinton would win. Vote counting was delayed in Nevada by heavy turnout.
"This is your win," Clinton said in a tweet, thanking supporters for her victory.
Clinton's narrow margin of victory in a state where she was once expected to win by double digits suggested the Democratic nominating race could be long and hard-fought, with Sanders performing strongly in a state with a heavy minority population.
Sanders was hoping to prove his appeal to minority voters in Nevada and puncture Clinton's argument that he is a one-note candidate whose support is limited to mostly white states.
After routing Clinton in New Hampshire and finishing a strong second in Iowa - states with nearly all-white populations - Nevada gave Sanders his first chance to prove he can win over black and Hispanic voters and compete nationally as the race moves to states with more diverse populations.