diff --git a/tuf/utils/role_sort.go b/tuf/utils/role_sort.go
index <HASH>..<HASH> 100644
--- a/tuf/utils/role_sort.go
+++ b/tuf/utils/role_sort.go
@@ -19,6 +19,9 @@ func (r RoleList) Len() int {
 func (r RoleList) Less(i, j int) bool {
 	segsI := strings.Split(r[i], "/")
 	segsJ := strings.Split(r[j], "/")
+	if len(segsI) == len(segsJ) {
+		return strings.Compare(r[i], r[j]) == -1
+	}
 	return len(segsI) < len(segsJ)
 }
make roles sort alphabetically when equivalent number of segments