diff --git a/backend/api_test.go b/backend/api_test.go
index b34d0f0..940b8c9 100644
--- a/backend/api_test.go
+++ b/backend/api_test.go
@@ -268,6 +268,36 @@ func TestCreateTask(t *testing.T) {
 	responseWithUser.Value("id").Number().NotEqual(taskId) // Ensure different ID
 }
 
+func TestDeleteTask(t *testing.T) {
+	e := startServer(t)
+
+	// Create a new task without assigned user
+	requestBody := map[string]interface{}{
+		"name":   "Test Task",
+		"reward": 100,
+	}
+
+	response := e.POST("/tasks").
+		WithJSON(requestBody).
+		Expect().
+		Status(201). // Expect Created status
+		JSON().Object()
+
+	// Verify the response has an ID
+	response.ContainsKey("id")
+	taskId := response.Value("id").Number().Raw()
+
+	// Delete the task
+	e.DELETE("/task/" + strconv.Itoa(int(taskId))).Expect().Status(200)
+	// Verify the task no longer exists
+	e.GET("/task/" + strconv.Itoa(int(taskId))).Expect().Status(404)
+}
+
+func TestDeleteTaskNotFound(t *testing.T) {
+	e := startServer(t)
+	e.DELETE("/task/1").Expect().Status(404)
+}
+
 func TestCreateTaskNoName(t *testing.T) {
 	e := startServer(t)
 
diff --git a/backend/db.go b/backend/db.go
index 1a9dbaf..1a1fcd8 100644
--- a/backend/db.go
+++ b/backend/db.go
@@ -221,6 +221,21 @@ func (db *Db) GetTask(id int) (Task, error) {
 	return task, nil
 }
 
+func (db *Db) DeleteTask(id int) error {
+	tx, err := db.db.Begin()
+	if err != nil {
+		return err
+	}
+	defer tx.MustRollback()
+
+	err = tx.Query("delete from tasks where id = ?").Bind(id).Exec()
+	if err != nil {
+		return err
+	}
+
+	return tx.Commit()
+}
+
 func (db *Db) HasTask(id int) (bool, error) {
 	count := 0
 	err := db.db.Query("select count(*) from tasks where id = ?").
diff --git a/backend/main.go b/backend/main.go
index 11fb508..3260856 100644
--- a/backend/main.go
+++ b/backend/main.go
@@ -333,6 +333,37 @@ func putTask(c *gin.Context) {
 	c.JSON(http.StatusOK, gin.H{"message": "Task updated successfully"})
 }
 
+func deleteTask(c *gin.Context) {
+	taskIdStr := c.Param("taskId")
+	taskId, err := strconv.Atoi(taskIdStr)
+	if err != nil {
+		log.Printf("Invalid task ID: %v", err)
+		c.JSON(http.StatusBadRequest, gin.H{"error": "Invalid task ID"})
+		return
+	}
+
+	hasTask, err := db.HasTask(taskId)
+	if err != nil {
+		log.Printf("Error checking task existence: %v", err)
+		c.JSON(http.StatusInternalServerError, gin.H{"error": ErrInternalServerError})
+		return
+	}
+
+	if !hasTask {
+		c.JSON(http.StatusNotFound, gin.H{"error": "Task not found"})
+		return
+	}
+
+	err = db.DeleteTask(taskId)
+	if err != nil {
+		log.Printf("Error deleting task: %v", err)
+		c.JSON(http.StatusInternalServerError, gin.H{"error": ErrInternalServerError})
+		return
+	}
+
+	c.JSON(http.StatusOK, gin.H{"message": "Task deleted successfully"})
+}
+
 func postHistory(c *gin.Context) {
 	userIdStr := c.Param("userId")
 	userId, err := strconv.Atoi(userIdStr)
@@ -412,6 +443,7 @@ func start(ctx context.Context, config *ServerConfig) {
 	router.GET("/api/tasks", getTasks)
 	router.GET("/api/task/:taskId", getTask)
 	router.PUT("/api/task/:taskId", putTask)
+	router.DELETE("/api/task/:taskId", deleteTask)
 
 	srv := &http.Server{
 		Addr:    config.Addr,