diff --git a/src/cli.c b/src/cli.c
index 8c7414f..b0e0a6d 100644
--- a/src/cli.c
+++ b/src/cli.c
@@ -70,7 +70,6 @@
 
 static const char stats_sock_usage_msg[] =
 	"Unknown command. Please enter one of the following commands only :\n"
-	"  clear counters : clear max statistics counters (add 'all' for all counters)\n"
 	"  help           : this message\n"
 	"  prompt         : toggle interactive mode with prompt\n"
 	"  quit           : disconnect\n"
@@ -542,70 +541,6 @@
 			}
 		}
 	}
-	else if (strcmp(args[0], "clear") == 0) {
-		if (strcmp(args[1], "counters") == 0) {
-			struct proxy *px;
-			struct server *sv;
-			struct listener *li;
-			int clrall = 0;
-
-			if (strcmp(args[2], "all") == 0)
-				clrall = 1;
-
-			/* check permissions */
-			if (strm_li(s)->bind_conf->level < ACCESS_LVL_OPER ||
-			    (clrall && strm_li(s)->bind_conf->level < ACCESS_LVL_ADMIN)) {
-				appctx->ctx.cli.msg = stats_permission_denied_msg;
-				appctx->st0 = STAT_CLI_PRINT;
-				return 1;
-			}
-
-			for (px = proxy; px; px = px->next) {
-				if (clrall) {
-					memset(&px->be_counters, 0, sizeof(px->be_counters));
-					memset(&px->fe_counters, 0, sizeof(px->fe_counters));
-				}
-				else {
-					px->be_counters.conn_max = 0;
-					px->be_counters.p.http.rps_max = 0;
-					px->be_counters.sps_max = 0;
-					px->be_counters.cps_max = 0;
-					px->be_counters.nbpend_max = 0;
-
-					px->fe_counters.conn_max = 0;
-					px->fe_counters.p.http.rps_max = 0;
-					px->fe_counters.sps_max = 0;
-					px->fe_counters.cps_max = 0;
-					px->fe_counters.nbpend_max = 0;
-				}
-
-				for (sv = px->srv; sv; sv = sv->next)
-					if (clrall)
-						memset(&sv->counters, 0, sizeof(sv->counters));
-					else {
-						sv->counters.cur_sess_max = 0;
-						sv->counters.nbpend_max = 0;
-						sv->counters.sps_max = 0;
-					}
-
-				list_for_each_entry(li, &px->conf.listeners, by_fe)
-					if (li->counters) {
-						if (clrall)
-							memset(li->counters, 0, sizeof(*li->counters));
-						else
-							li->counters->conn_max = 0;
-					}
-			}
-
-			global.cps_max = 0;
-			global.sps_max = 0;
-			return 1;
-		}
-		else {
-			/* unknown "clear" argument */
-			return 0;
-		}
-	}
 	else if (strcmp(args[0], "set") == 0) {
 		if (strcmp(args[1], "maxconn") == 0) {
 			if (strcmp(args[2], "frontend") == 0) {
diff --git a/src/stats.c b/src/stats.c
index 56266eb..64be56c 100644
--- a/src/stats.c
+++ b/src/stats.c
@@ -3034,6 +3034,64 @@
 	return 1;
 }
 
+static int cli_parse_clear_counters(char **args, struct appctx *appctx, void *private)
+{
+	struct proxy *px;
+	struct server *sv;
+	struct listener *li;
+	int clrall = 0;
+
+	if (strcmp(args[2], "all") == 0)
+		clrall = 1;
+
+	/* check permissions */
+	if (!cli_has_level(appctx, ACCESS_LVL_OPER) ||
+	    (clrall && !cli_has_level(appctx, ACCESS_LVL_ADMIN)))
+		return 1;
+
+	for (px = proxy; px; px = px->next) {
+		if (clrall) {
+			memset(&px->be_counters, 0, sizeof(px->be_counters));
+			memset(&px->fe_counters, 0, sizeof(px->fe_counters));
+		}
+		else {
+			px->be_counters.conn_max = 0;
+			px->be_counters.p.http.rps_max = 0;
+			px->be_counters.sps_max = 0;
+			px->be_counters.cps_max = 0;
+			px->be_counters.nbpend_max = 0;
+
+			px->fe_counters.conn_max = 0;
+			px->fe_counters.p.http.rps_max = 0;
+			px->fe_counters.sps_max = 0;
+			px->fe_counters.cps_max = 0;
+			px->fe_counters.nbpend_max = 0;
+		}
+
+		for (sv = px->srv; sv; sv = sv->next)
+			if (clrall)
+				memset(&sv->counters, 0, sizeof(sv->counters));
+			else {
+				sv->counters.cur_sess_max = 0;
+				sv->counters.nbpend_max = 0;
+				sv->counters.sps_max = 0;
+			}
+
+		list_for_each_entry(li, &px->conf.listeners, by_fe)
+			if (li->counters) {
+				if (clrall)
+					memset(li->counters, 0, sizeof(*li->counters));
+				else
+					li->counters->conn_max = 0;
+			}
+	}
+
+	global.cps_max = 0;
+	global.sps_max = 0;
+	return 1;
+}
+
+
 static int cli_parse_show_info(char **args, struct appctx *appctx, void *private)
 {
 	if (strcmp(args[2], "typed") == 0)
@@ -3075,6 +3133,7 @@
 
 /* register cli keywords */
 static struct cli_kw_list cli_kws = {{ },{
+	{ { "clear", "counters",  NULL }, "clear counters : clear max statistics counters (add 'all' for all counters)", cli_parse_clear_counters, NULL, NULL },
 	{ { "show", "info",  NULL }, "show info      : report information about the running process", cli_parse_show_info, cli_io_handler_dump_info, NULL },
 	{ { "show", "stat",  NULL }, "show stat      : report counters for each proxy and server", cli_parse_show_stat, cli_io_handler_dump_stat, NULL },
 	{{},}
