BFS guarantees the shortest path in an unweighted graph. However, in a weighted graph, BFS may not find the shortest path since it does not consider edge weights.